I have a file like this
(ns boston.core)
If I (load "boston/core") from the REPL, however, my *ns* doesn’t change to boston but remains user. Why is this?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
This is because load just loads the specified file (into the boston.core namespace, as specified at the top of the file). It doesn’t do anything to the current namespace in the REPL.
If you also want to switch namespace in the REPL to use whatever has just been loaded you need to do something like:
Note that “boston/core” has a slash because it refers to a file resource, whereas namespaces themselves use a dot as separators.