clojure 2026-07-15

One thing that wasn’t very clear to me, but makes sense, is that :defaults is only for the level that you applied :or:

user=> (let [{{{c :c :or {c 1}} :b} :a :defaults d} {}] d)
Syntax error macroexpanding let at (REPL:1:1).
Can't specify :defaults without :or
So its not all defaults applied anywhere, its those that are applied on this level of nesting. (No question here, but maybe input for the wordsmiting on how to explain people like me what :defaults does.)

the key :a could appear in many different nested maps, with different defaults, so there can't be a single map of cross-level defaults. All directives apply only to the destructuring form in which they appear.

👍 1