Journal 2019.15 - 1.10.1-beta2, closed schemas
I’ve been fighting some bronchial stuff this week so didn’t quite get a full week in, but there are a couple things to talk about.
This week we released Clojure 1.10.1-beta2, which has just a couple minor error handling tweaks. I also posted a more detailed example of how the changes in Clojure 1.10.1 will affect the error experience through tools like Leiningen on reddit that has spurred some additional conversation.
It would great if you wanted to try using Clojure 1.10.1-beta2 and give us your feedback. The changes from 1.10.0 are minimal so it should be easy to try in dev.
From the beginning, spec was conceived as a predicative system for checking Clojure data, and embracing the Clojure approach to open and evolving maps. However, there are use cases where it is useful to verify that maps have only keys from a fixed set - for sending to a rigid consumer, checking for typos, etc. People have been asking for “closed specs” since the beginning of spec.
Rich and I have been working on something about this and Rich’s key insight is that the “closed” part of this is in the check, not in the spec. I’m still working through analyzing the best implementation approach, but hopefully I can finish that off before next week’s journal.
Other stuff I enjoyed this week…
I listened to a great episode of the Larry Wilmore podcast this week with David Epstein. Tons of fascinating stuff in there from his forthcoming book “Range” about specialists and generalists. I’m sure you can find some interesting ideas if you give it a listen.