Re: Clojure vs. CL macros question

2008-12-21 Thread Rich Hickey
On Dec 19, 2:05 pm, Stuart Halloway wrote: > According to Paul Graham's On Lisp, macroexpanders should be purely > functional, and you should not count on how often a macro gets > expanded. This seems like a reasonable restriction for Clojure too. > However, Chouser posted an example that shows

Re: Clojure vs. CL macros question

2008-12-19 Thread Mon Key
> This seems like a reasonable restriction for Clojure too. Third rule. Macros break the rules. Don't place arbitrary restrictions on rule breaking :P s_P On Dec 19, 2:05 pm, Stuart Halloway wrote: > According to Paul Graham's On Lisp, macroexpanders should be purely   > functional, and you sh

Re: Clojure vs. CL macros question

2008-12-19 Thread Stuart Sierra
I think it's a generally good idea for macros to be purely functional, but it's not always a requirement. As long as Clojure remains exclusively a compiler and not an interpreter (unlike some CL implementations) I think it is safe to assume that macros will only run at compile time. -S On Dec 19

Clojure vs. CL macros question

2008-12-19 Thread Stuart Halloway
According to Paul Graham's On Lisp, macroexpanders should be purely functional, and you should not count on how often a macro gets expanded. This seems like a reasonable restriction for Clojure too. However, Chouser posted an example that shows the expansion of proxy does have a side effec