I am curious about something that Michael Drogalis did here:
(defn- load-support [support-file]
(let [support-ns (create-ns 'support-ns)
support-text (slurp (.getPath support-file))]
(binding [*ns* support-ns]
(eval '(clojure.core/refer 'clojure.core))
(eval '(refer 'janus.support))
(load-string support-text))))
https://github.com/gga/janus/blob/master/src/janus/support.clj
So, we create a namespace ex-nihilo, and then we "load-string" our
supporting/contract code in that namespace. Is this being done mostly for
hygiene? Or security? Am I correct if I say this is done because it might
be a mess if we loaded the contents of that external file in our current
namespace?
--
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
---
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 [email protected].
For more options, visit https://groups.google.com/d/optout.