On Monday 22 December 2008 05:51, Mark Volkmann wrote: > On Sun, Dec 21, 2008 at 2:30 PM, Randall R Schulz <rsch...@sonic.net> wrote: > > On Sunday 21 December 2008 11:33, chris wrote: > >> ... > >> > >> That answers my question. Don't use a namespace, and the keyword > >> is global. Pass in a namespace, and the keyword is in that > >> namespace. > > > > Yes, the default namespace for keywords is different than for > > symbols, which is why the ::keyword form exists. > > Can you explain what ::keyword does? I haven't encountered that > before and can't find any documentation on it.
Rick and Stuart H. should answer, but as I understand it, instead of the default "global" namespace (no namespace at all): 1:1 user=> (namespace :keyword) nil or an explicit namespace: 1:2 user=> (namespace :space/keyword) "space" the ::keyword notation yields a keyword in the current namespace (that in effect when the form containing the double-colon keyword is compiled): 1:3 user=> (namespace ::keyword) "user" Randall Schulz --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en -~----------~----~----~----~------~----~------~--~---