It is there to support the “:reload” and “:reload-all” features of “require” 
and to help separate the concern of loading libs from the concern of tracking 
namespaces.

--Steve

> On Jan 29, 2018, at 6:36 PM, Raymond Huang <12ay.hu...@gmail.com> wrote:
> 
> I was poking around `tools.namespace` and I found it interesting that the 
> implementation of `remove-lib` is:
> 
> ```(defn remove-lib
>   "Remove lib's namespace and remove lib from the set of loaded libs."
>   [lib]
>   (remove-ns lib)
>   (dosync (alter @#'clojure.core/*loaded-libs* disj lib)))
> ```
> 
> 
> I’m wondering if someone can enlighten me to explain why `*loaded-libs*` 
> needs to exist, as opposed to checking `clojure.lang.Namespace` directly?
> 
> This is a question carried over from slack: 
> https://clojurians.slack.com/archives/C03S1KBA2/p1517211857000021
> -- 
> 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
> --- 
> 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 clojure+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

-- 
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
--- 
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 clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to