I think my intervention sounded rude. Sorry if it did, that was not my intention. Besides the trivial syntax errors (which I thought were just a bad copy-by-hand of source code), I saw no reason for it not to work.
P!
2009/7/15 lowly coder lowlycoder@huoyanjinjing.com:
Yeah -- sorry for wastiing everyone's time.
On Tue, Jul 14, 2009 at 10:49 PM, Adrien Piérardpierarda@iro.umontreal.ca wrote:
2009/7/15 lowly coder lowlycoder@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, 日本語, 한국어