chicken-users
[Top][All Lists]
Advanced

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

Re: [Chicken-users] escaping the # character in identifiers


From: felix winkelmann
Subject: Re: [Chicken-users] escaping the # character in identifiers
Date: Wed, 7 Sep 2005 12:06:06 +0200

On 9/7/05, Dmitry Lizorkin <address@hidden> wrote:
> Hello!
> 
> I am not quite familiar with Chicken macro system, and I cannot understand
> the following result:
> 
> Version 2, Build 0 - linux-unix-gnu-x86 - [ dload ]
> (c)2000-2005 Felix L. Winkelmann
> #;1> (define-macro (make-sys-id id)
>  (string->symbol (string-append "##sys#" (symbol->string id))))
> #;2> ##sys#structure?
> #<procedure>
> #;3> (make-sys-id structure?)
> Error: unbound variable: ##sys#structure?
> 
> I get the similar result with the compiled code as well.
> 
> Could you please explain this result to me? What should I do in order to
> escape the # character in identifiers?
> 

Thomas gives the right answer. On the other hand, what are you
trying to do? It is really not recommended to use the "qualified symbols hack"
for anything else than accessing internal features (i.e. using it directly).
Qualified symbols are _not_ intended as some sort of package system.

Perhaps we can find a better solution.


cheers,
felix




reply via email to

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