chicken-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Question about how to check a symbol is bound


From: Peter Bex
Subject: Re: Question about how to check a symbol is bound
Date: Fri, 23 Jun 2023 09:40:01 +0200

On Fri, Jun 23, 2023 at 03:32:38PM +0800, Pan wrote:
> Ah, that make sense. It seems I can just use the '##sys#slot' procedure to
> accomplish all that tasks.

Please don't use ##sys#slot unless you know what you're doing - the
procedure is unsafe and will cause segmentation faults when used on
non-block objects.  Anything that starts with ##sys# or ##core# etc
is intentionally undocumented because it's not meant for user code.

> Would you please elaborate about the "transformed
> name"?  I see there are codes reference symbols like "##sys#slot" or
> "scheme#list", but I can't find document describe them. Is there any
> document I can look into? More specifically, how can I transfer "list" to
> "scheme#list"? Is there procedure can do that?

scheme#list is the fully qualified symbol that means it's the "list"
procedure from the "scheme" module.  If you do "(import scheme)" and then
just use "list" without prefix, it will get rewritten under the hood.

Again, this is an implementation detail and not meant to be used
directly.

Perhaps if you can explain why you need to know if a symbol is bound or
unbound, we might be able to help you better achieve your goal.

Cheers,
Peter

Attachment: signature.asc
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]