I can't think of an interpretation where this behavior is desirable, so I have create the incredibly-long-named-ticket http://www.assembla.com/spaces/clojure/tickets/273-def-with-a-function-value-returns-meta-%7B-macro-false%7D--but-def-itself-doesn-t-have-meta .

Stu

I've been trying to pinpoint the source of the problem and I found
something pretty amazing:

Regular def:

user> (def foobar (.getRoot #'defalias))
#'user/foobar
user> (meta #'foobar)
{:ns #<Namespace user>, :name foobar, :file "NO_SOURCE_FILE", :line 1}

def occuring as an argument to a function:

user> (println (def foobar (.getRoot #'defalias)))
#'user/foobar
nil
user> (meta #'foobar)
{:macro false, :ns #<Namespace user>, :name foobar, :file
"NO_SOURCE_FILE", :line 1}

I've no idea why it adds in the [:macro false] entry, but once it's
there, it's easy to see how the alias doesn't work as a macro...

Sincerely,
Michał

--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to [email protected]
Note that posts from new members are moderated - please be patient with your first post.
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

--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to [email protected]
Note that posts from new members are moderated - please be patient with your 
first post.
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