Hi,

the correct way to *change* to a namespace is in-ns. Calling ns will also 
refer to clojure.core. The first scenario happens because the namespace 
already exists and the ns tries to refer extend to #'clojure.core/extend 
which fails because #'clj-time.core/extend is already there. The second 
scenario happens because the namespace did not exist before. So the ns form 
sets up everything as normal. Now loading the file will refer extend to 
clj-time.core/extend. This will only give a warning because now 
clojure.core/extend is replaced and clojure.core gets special treatment here 
by giving only a warning instead of an exception.

tl;dr: Use ns to setup a namespace. Use in-ns to switch namespaces. In your 
case: (in-ns 'test.core).

Sincerely
Meikel

-- 
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

Reply via email to