I’ve got a couple questions for Alex Miller and/or the other Cognitect 

   1. *Are single-segment namespaces still “bad” when it comes to 
   registering specs under qualified keywords?*
   In the past, single-segment namespaces have been discouraged in the 
   Clojure community—both because of Java interop concerns and because of the 
   possibility of name-collision when combining projects. However, many of the 
   spec examples I’ve seen have demonstrated registering specs under keywords 
   qualified by a single-segment namespace. For example, the guide’s 
   section on multi-spec <http://clojure.org/guides/spec#_multi_spec> 
   defines :search/url and :error/message. Is that because 
   namespace-qualifiers of specs shouldn’t be under the same constraints as 
   namespaces used to organize code? I’m *guessing* not; it seems more 
   likely that the single-segment namespaces have been used only to keep the 
   code snippets straightforward and focused on spec, and that “real” code 
   would alias (e.g.) my-company.my-project.search as search before 
   defining a ::search/url spec.
   2. *When designing, how do you decide whether to use a simple keyword or 
   a qualified one?*
   There’s an interesting mix of the two in the official docs and in the 
   code for spec itself. For example: the spec rationale 
   <http://clojure.org/about/spec#_sequences> and guide 
   <http://clojure.org/guides/spec#_sequences> both use simple keywords 
   when labeling path components, and spec reports invocation errors for 
   instrumented functions with maps that exclusively use qualified keys at the 
   “root” but simple keywords appear as values 
   and as keys in nested maps 

Thank you for your help. I really appreciate it.


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
For more options, visit this group at
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