Fork me on GitHub
#duct
<
2019-04-06
>
miridius12:04:36

Hey all, can someone explain the reasoning behind starting in the user namespace and then having a (dev) function which switches to the dev namespace? Why not simply set the :init-ns to dev to begin with?

jeffmad17:04:42

I think the reason is because there is a tendency to require more namespaces in user and if something goes wrong then user won’t load properly. to prevent that, keep user as lean as possible so you can always “get back to it”, and feel free to load up dev with whatever.

(defn dev []
  (require 'dev)
  (in-ns 'dev))