Re: Keyword namespaces

2010-09-19 Thread Kyle Schaffrick
On Sun, 19 Sep 2010 23:07:55 +0200 Meikel Brandmeyer wrote: > Hi, > > Am 19.09.2010 um 22:59 schrieb ataggart: > > > Also note that the namespace portion of a keyword does not get > > resolved against the current aliases. E.g., > > user=> (require '[clojure.java.io :as io]) > > nil > > user=>

Re: Keyword namespaces

2010-09-19 Thread Meikel Brandmeyer
Hi, Am 19.09.2010 um 22:59 schrieb ataggart: > Also note that the namespace portion of a keyword does not get > resolved against the current aliases. E.g., > user=> (require '[clojure.java.io :as io]) > nil > user=> (= :io/foo :clojure.java.io/foo) > false It does with ::. user=> (= ::io/foo :

Re: Keyword namespaces

2010-09-19 Thread ataggart
now the namespace "xsl" has semantic meaning on symbols when >   ;; they're evaluated in this context: >   user=> #'xsl/value-of >   #'some.library/value-of > > Is there any situation where, in that examaple, the namespace "xsl" on > a keyword such as :

Re: Keyword namespaces

2010-09-19 Thread Kyle Schaffrick
be conflated with the namespace alias "xsl" that I created with require? Or, does Clojure consider keyword namespaces to be completely meaningless and opaque, the same as it does with their names? I can't find any situation where the two blur together except for the ::keyword syntax, b

Re: Keyword namespaces

2010-09-19 Thread ataggart
Unlike symbols, keywords just evaluate to themselves. The keyword :foo will not collide with a var foo, likewise keyword :my-ns/foo will not collide with var my-ns/foo. So, if I understand you correctly, :xsl/ value-of would work just fine. On Sep 19, 11:56 am, Kyle Schaffrick wrote: > Would it

Keyword namespaces

2010-09-19 Thread Kyle Schaffrick
Would it be correct to say that the namespace portions of keywords are semantically opaque? In other words, if I have a keyword :my-ns/foo and a symbol 'my-ns/foo, obviously the namespace in the symbol has semantic meaning to the language when it's evaluated (or syntax-quoted), but the namespace o