Defonce only associates a name with a root value if the name does not have a root value.
For example, for example, Jay Fields blogs , it can be used together when you want to reload namespaces, but you may not need to reload everything.
(defonce ignored-namespaces (atom #{})) (defn reload-all [] (doseq [n (remove (comp @ignored-namespaces ns-name) (all-ns))] (require (ns-name n) :reload )))
Asthor
source share