r/Clojure • • May 24 '16

clojure.spec Guide

http://clojure.org/guides/spec
82 Upvotes

35 comments sorted by

View all comments

6

u/[deleted] May 24 '16 edited May 24 '16

Why is there a separate registry of keywords for maintaining defined specs than clojure.core/def and Vars?

20

u/richhickey May 24 '16

Because enough things are already kept in the reified namespaces, i.e. functions and variables, both of which have to be for performance. The great thing about namespaced keywords/symbols is that we can have many 'databases' if you will, we need not keep everything in the same place.

5

u/weavejester May 24 '16

Currently reified namespaces can be aliased, whereas namespaces that exist just for keywords and symbols have to always be specified in full. Are there any plans for extending clojure.core/alias to allow aliasing of keyword/symbol namespaces?

3

u/alexdmiller May 24 '16

Maybe. We've looked at it a bit.