2012/3/29 Alf Kristian Støyle <[email protected]>: > So, long story short, why are namespaces in Clojure mutable? What is > the rationale behind this?
It's for REPL development. Everytime you redefine a function, its Var needs to be updated. OTOH, redefining a var during the normal course of operation is frowned upon. For this reason, defs should always be top level (modulo an enclosing let, or something). The only official way to change a Var value during normal operation is binding, which is thread local and dynamically scoped (bound Vars can also be set! while bound, still thread locally), so its semantics are well defined, if a bit more obscure than normal lexical/immutable let. kind regards -- 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
