by 0xDEAFBEAD · 1y ago · 0 comments
This seems a little nuts, to be honest. It feels like you're just pushing failures from easy-to-diagnose issues with the function signature, to hard-to-diagnose issues with the function body. Basically the function body now has to support any combination of hash parameters that the function has ever taken over its entire history -- Is this information documented? Do you have test coverage for every possible parameter combo?
"Am I missing a key, is the value in the hashmap nil, or was there an upstream error or error in this function that is presenting as nil?"
Of course, normal rules apply like, "Don't pollute your program with a proliferation of booleans."
https://clojure.org/guides/destructuring#_associative_destru...
Some extra reading if you're curious: https://softwareengineering.stackexchange.com/questions/2723...