> I don't think you're supposed to use spaces in keywords.

Using spaces in keywords is completely valid, as is using spaces in
symbols. You just have to be aware that there may be times when you
can't represent them in a literal form. pr-str could be extended to do
this though:

(pr-str :foo)
":foo"

(pr-str k) ; as in your example
"(keyword "jaja nee")"

There are many times when you may actually want to have spaces as
keywords. Consider the following json:

{"first name" : "John"
 "last name" : "Doe"
 "age" : 42}

If we convert this json to clojure, it would be nice to be able to do:

user=> (:age data)
42

And we can still do this:

user=> ((keyword "first name") data)
"John"

Why restrict the user needlessly?


Timothy

-- 
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
Note that posts from new members are moderated - please be patient with your 
first post.
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

Reply via email to