The registry is stored in a global atom which is usually considered an anti-pattern in library code. It makes sense here though, based on the idea that global conflicts are avoided by namespaced keywords.
What bothers me though is reloadability. When I hit clojure.tools.namespace.repl/reload-all, I potentially end up with zombie specs which can have unexpected effects (note s/keys allows undefed kws). Not wanting to hijack this thread, but is this gonna be resolved in ctn or somehow? Kind regards, Leon. On Tuesday, November 29, 2016 at 5:16:36 PM UTC+1, Alex Miller wrote: > > At the risk of repeating what you already said, we are pushing too much > stuff onto vars and var meta. We have namespaced names so there's no reason > to push more stuff into vars and we can use an independent registry. > > > On Tuesday, November 29, 2016 at 8:57:47 AM UTC-6, kovasb wrote: >> >> Spec is surprisingly easy to grok given how much it does. >> >> s/def jumped out at me as an out-of-the-box choice, that I could not >> immediately rationalize. >> >> So I'm wondering: why not just use standard def? What does one gain/lose? >> >> This is not just an academic question. Lots of people like me look at >> Clojure's APIs as an example to follow, so now I'm wondering when I should >> make the same choice. >> >> I asked Rich about this at the Lisp NYC meetup, the response was to the >> effect of "vars are already overloaded, lets use a separate database", >> which makes sense but the implications of that are not clicking. >> >> >> >> >> -- 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.