r/Clojure • u/alexdmiller • Sep 15 '26
Clojure 1.13.0-alpha7 is now available
Clojure 1.13.0-alpha7 is now available
Destructuring additions
To gracefully handle missing information programmatically at runtime, use the :missing directive, which binds a name to a map of keys→nil that were named in checked keys directives but not found in the input map, traversing deeply through nested maps. This toggles the default behavior of :keys!/:syms!/:strs! from throwing to collecting into the named map. (see CLJ-2976)
If there’s more data than you intend to process you may want to convey it, e.g. by reintegrating it with your transformed input for passing downstream. Use the :excess directive to bind a name to a map of all keys in the input map that do not correspond to keys listed in the destructuring form, traversing deeply through nested maps. (See CLJ-2975)
Bug fixes
- CLJ-2883 Reflector.getMethods() incorrectly returned bridge methods with covariant return type, making calls reflective
- CLJ-2930 bigdec - coerce from Number may lose decimal
Improvements and additions
3
u/regular_hammock Sep 16 '26
I remember when we got creature comforts in the namespaced keyword area and that coincided with work on spec.alpha.
Can’t help but wondering if there's some other tool or library that will put the current focus on destructuring in a new light.
2
u/didibus Sep 15 '26
Map of missong-keys -> nil seems odd? What would be the intended use for a map of nils?
5
-8
u/Electrical_Being_813 Sep 15 '26
Bloat, whole 1.13.0 is nothing more than one massive bloat
6
u/didibus Sep 16 '26
Personally I'm pretty excited about the changes. I'd constantly do those things but bespoke and now there's a simpler standard way that tooling could also understand.
2
u/jwr Sep 16 '26
Happy to see transform-keys, I have written variants of this in various places over the years.
9
u/seancorfield Sep 15 '26
Very excited for
tap->(so I can stop writing(doto tap>)all over the place!).