I'm starting to dive into clojure.spec, which is a strong motivation for me 
to finally appreciate and use namespaced keywords -- an aspect of Clojure 
that I've ignored until now.

I don't have a good sense of style re how to namespace keywords, especially 
in standalone projects. I'm inclined to either create a separate namespace 
for each abstraction (approximately corresponding to each class in an OOP 
view of my data) or to jam all my keywords into one namespace 
(corresponding to the fact that I own all of them).  Neither approach feels 
completely right; the first seems much cleaner, but can quickly become very 
verbose.

Can anyone point me to some tasteful code or style guide that discusses the 
interplay of spec and namespaced keywords?
The existing examples seem to be a bit ad hoc. For example, 
http://clojure.org/guides/spec shows:

> (s/def ::date inst?) (s/def ::suit #{:club :diamond :heart :spade})

Which implies defining dates, a generally useful concept, in a local 
namespace along with parts of a card game.
I hope/assume this is just temporary, and clojure.core will soon evolve 
specs for types like dates, right?

-- 
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
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to