Thanks for the enlightening and patient explanation, but there’s still something mysterious. One the 1 hand, perhaps it is not necessary to really understand at my state of development, but rather just form good habits. But on the other hand this mystery is troubling.
Part of your explanation, @seancorfield, is confusing to me because Dfa
is not a java class (as you claim), it is a symbol used as an identifier to denote a java class, in the same way that my-object
is not a function, but rather a symbol used as an identifier which designates some value. The namespace (as I understand) does not manage objects and functions and classes, but it only manages symbols. Am I right, or am I confused? The name spaces just manage which symbols can be abbreviated with short names. But the name spaces does NOT know about which values symbols have.
Does the namespace treat symbols differently depending on what type their value is? The explanation you gave above seems to claim that symbols whose values are java classes are treated differently in the namespace than symbols whose values are function or strings or numbers. This is indeed curious to me because the symbol enters the namespace after the parser encounters it, well before the evaluator determines the value of the symbol in the current evaluation context.
I think this really boils down to the fact that name spaces in clojure do not work exactly the same as they do in Common Lisp, and symbols don’t work the same either. In Common Lisp there’s no distinction between symbol and var— there are only symbols, interned and uninterned.
I think I have the same problem when I use backquote/tilde, especially when I use them outside a macro definition. I’m always in fear that some symbol references something nefarious. I’ve posed a question here, regarding my confusion about backquote.