Re: defmacro should return the function, not nil

2008-10-25 Thread V.Quixote
Macros in closure are (fn ...) where the var in which the function resides has a flag in the metadata set. Which means there is no difference between the two except to eval (or apply). I was just thinking that all of the def* should share return values. --~--~-~--~~~--

Re: defmacro should return the function, not nil

2008-10-25 Thread Timothy Pratley
> Doesn't return the return value of the defn, which I think it should > for consistency. I'm new to Lisp so please forgive me if I'm way off track here... Macros are not functions, and don't enjoy the same rights as first class functions (ie: being assignable). Macro-expansion happens before exe

defmacro should return the function, not nil

2008-10-25 Thread V.Quixote
It's unlikely to come up, but I noticed this: (macroexpand-1 '(defmacro foo [] 'bar)) =>(do (clojure/defn foo [] (quote bar)) (. (var foo) (setMacro))) Doesn't return the return value of the defn, which I think it should for consistency. --~--~-~--~~~---~--~~ You