> 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 execution, so it should be impossible
to have a reference to one.
So from my naive point of view, defmacro returning a value would be
very confusing indeed.

user=> (def *myfun* (defmacro foo [] 'bar))
#=(var user/*myfun*)
user=> *myfun*
nil
user=> foo
java.lang.Exception: Can't take value of a macro: #=(var user/foo)

user=> (def *myfun* (defn foo2 [] 'bar))
#=(var user/*myfun*)
user=> *myfun*
#=(var user/foo2)

Is the behaviour I would expect.

However maybe you are refering to something Clojure specific I'm not
aware of?


Regards,
Tim.

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to