We're updating the issue view to help you get more done. 

map destructuring: prevent evaluation of values in :or when they are not used/needed

Description

The name :or implies this should behave as "or" and be "lazy" but it's not the case currently.
The following gist shows the issue. :x is present in the map but we eval the default value:

1 2 3 4 5 6 7 8 9 10 (defn foo [{:keys [x] :or {x (println :set-default)}}] x) user> (foo {:x 1}) :set-default 1

Environment

None

Status

Assignee

Unassigned

Reporter

Max Penet

Labels

Approval

Triaged

Patch

None

Affects versions

Release 1.6

Priority

Trivial