Fork me on GitHub

In Clojure, I get:

user=> (meta #'*ns*)
{:added "1.0", :ns #object[clojure.lang.Namespace 0x18fdb6cf "clojure.core"], :name *ns*, :tag clojure.lang.Namespace, :doc "A clojure.lang.Namespace object representing the current namespace."}
However, in bb for a bunch of vars (`#'global-hierarchy` #'*ns* #'*print-meta* #'*out* #'alength #'*math-context* #'*command-line-args* #'*err* #'*print-level* #'*in* #'*print-length* #'*print-namespace-maps* #'*warn-on-reflection* #'*data-readers* #'*file* #'clojure.core/unquote) I get:
user=> (meta #'*ns*)
{:dynamic true}
In particular, I’m interested in the fact that those vars don’t seem to have a namespace. Is that expected? Is it a reasonable assumption that if a var doesn’t have a namespace then I should consider its namespace to be clojure.core? They all are in Clojure.


@cfleming This is a bit of an historic mess: in the very beginning bb didn't even have namespaces and ever since they are optional as metadata. But this can be straightened out.


I'll try to fix it for the next release


The entire list can be found with: (clojure.pprint/pprint (for [ns (all-ns), [k v] (ns-publics ns) :when (not (:ns (meta v)))] [(str ns) k]))


@cfleming only 230 vars to go... I'll get there ;)


Hehe, ok, no problem - for the moment, I’m just defaulting to clojure.core if there’s no ns, which is correct for all the ones I’ve found so far except global-hierarchy, which doesn’t exist in Clojure.


Actually, sorry, I hadn’t fully grokked your message above - I see. I’ll see if I can work around that.