Hi,

Clojure's compile unit is one toplevel form. Therefore

(intern 'user 'bob3 3) 
bob3

works, while

(is (do (intern 'user 'bob2 2) bob2))

does not, because the former are two compilation units while the latter is 
only one. (Note: (do ...) is a special case. (do (intern 'user 'bob3 3) 
bob3) should actually work.)

Then there is a separate effect in that def immediately creates the Var 
when encountered during compilation. That explains why the def variant 
works as well. (And as a side-note: that's also why you don't do (defn foo 
[] (def a ...) ...))

Kind regards
Meikel

-- 
-- 
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
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
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 unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to