According to docs dir
lists only "public" vars.
Indeed, it does not show itself, and may not be available in current namespace:
user=> (dir user)
nil
user=>
user=>
user=> (in-ns 'foo)
#<Namespace foo>
foo=>
foo=>
foo=> (dir foo)
CompilerException java.lang.RuntimeException: Unable to resolve symbol: dir in this context, compiling:(NO_SOURCE_PATH:17)
What other (non-public) types of names/vars exist? (These are probably Java types?) How to list these non-public names? How are they imported into the namespace (or into some "default case" namespaces) on the startup? How default namespaces are searched through in runtime?
For instance in Python: dir()
lists everything in current namespace, if a referenced variable is not found it is checked among dir(__builtins__)
.