On Oct 15, 9:12 pm, Tom Lynch <[EMAIL PROTECTED]> wrote: > On Oct 16, 2:03 pm, Asbjørn Bjørnstad <[EMAIL PROTECTED]> wrote: > > > Why would it be? Code generation is a ideological yes-yes > > in lisps. > > No idea. I was just vaguely aware of Strong Opinions floating around > on topics such as this. The code I indicated has nothing to do with > what I'm actually looking at. >
I've wanted to do this type of thing before (with CL) and generally try to avoid it, so I'll share my reason: the declaration does not appear in source code. This would be particularly confusing if the macro wrapped code that was meant to reference these symbols because they could shadow variables you intended to use. (defmacro let-paste-tokens [[f s] & body] `(let [~(symbol (str f s)) 2] [EMAIL PROTECTED])) (let [foobar 1] (let-paste-tokens [foo bar] foobar)) => 2 Unless you understand the magic of let-paste-tokens, you can't read with the normal semantics of clojure code. Maybe this is not so bad with a top-level def as in your example, but you still can't grep to find where some symbol is declared, etc. -Mike --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/clojure?hl=en -~----------~----~----~----~------~----~------~--~---