The def special form seems to be a bit strange that way, in that (def
sym thingy) seems to do two things: execute a (declare sym) at read or
macroexpansion time, even when inside a function definition rather
than at top level, and execute an (alter-var-root! sym (constantly
thingy)) when actually reached by flow of control.

If you want runtime-only def behavior you need to either use the
namespace object's intern methods via interop or use (eval `(def ~sym
~thingy)).

-- 
Protege: What is this seething mass of parentheses?!
Master: Your father's Lisp REPL. This is the language of a true
hacker. Not as clumsy or random as C++; a language for a more
civilized age.

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

Reply via email to