[gambit-list] ##namespace fun

lowly coder lowlycoder at huoyanjinjing.com
Wed Jul 15 04:35:43 EDT 2009


Yeah -- sorry for wastiing everyone's time.


On Tue, Jul 14, 2009 at 10:49 PM, Adrien
Piérard<pierarda at iro.umontreal.ca> wrote:
> 2009/7/15 lowly coder <lowlycoder at huoyanjinjing.com>:
>> Why can't I do the following:
>> (define-macro (module name)
>>  ,(begin
>>     (##namespace (string-append (object->string ,name) "#"))
>>     (##include "~~lib/gambit#.scm")))
>
> Because nesting two unquotes without any backquote is likely to be meaningless.
> Because even if you did that properly, (string-append (o->s ,name)
> "#") is still a list whose CAR is string-append, instead of being a
> string (or a list whose CAR is a string, I dunno the syntax of
> namespaces).
> Because if you hade done the two above steps properly, it would probably work.
>
>
> (define-macro (module name)
>  `(begin
>     (##namespace (,(string-append (object->string name) "#")))
>     (##include "~~lib/gambit#.scm")))
> (module tata)
> (define toto 0)
> (pretty-print tata#toto)
>
> Does this do what you want?
>
> P!
>
>
> --
> Français, English, 日本語, 한국어
>



More information about the Gambit-list mailing list