Just venting about a couple of nuisances that came up while refactoring a function to take all args in a map.
-
Can’t provide :keys an array thanks to spec errors. I used to sometimes destructure with
(let [ks [:someof :the :keys] {:keys ks} :argmap])
but this is now illegal; the:keys
value needs to receive a literal inlined vector. -
I had a function taking two args, the second an option map. I made it into one arg by moving the first args into the map but lost the ability to refer to the first arg as I derive the default values of map entries, since map default values cannot refer to other values of the same map.
I’m just venting and don’t need solution ideas, unless theres an easy syntax fix that I missed short of using macros. I know that there are sensible technical reasons for both of these behaviors.