:range-0 (spec/cat :end number?)
:range (spec/cat :start number? :end number?)
:step (spec/cat :start number? :end number? :step number?))
:ret #(instance? clojure.lang.Seqable %))
We’re getting a new reader macro
As I understand it, this exists pretty exclusively to simplify the spec stuff, and whatever the final application of the spec stuff to macros is scheduled for later this week.
Namespaced keywords have always been a little clunky to me. There’s some kernel of something good in there, but I’m not quite sure I understand all the nuances or tradeoffs to it. Curious to see if spec and/or this reader macro causes a spike in namespaced keyword usage for things other than spec. Double curious to see what that actually means for Clojure programs.
I don’t think it’s very nuanced - namespaced keywords give you a global naming scheme, which is good as a key for other things. CLJ-1910 (and CLJ-1919 for namespaced key destructure) will remove most of the duplication of namespaces that make them more annoying to type (in the keyboard sense).
Additionally, we are evaluating a change to allow namespace aliases to refer to non-existent namespaces so that you could declare aliases there for keywords or symbols, purely for naming purposes. This would also ease another pain point around pervasive use of namepace aliases.
We don’t (and couldn’t) live in a world where we can’t make mistakes. Instead, we periodically check that we haven’t. Amazon doesn’t send you your TV via a UPS<Trucks<Boxes<TV>>>. So occasionally you might get a microwave, but the supply chain isn’t burdened with correctness proof. Instead we check at the edges and run tests.
I work in Ruby. Not only are we not burdened down by the obligations of ensuring correctness, we have a two drink minimum.