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:
Environment
None
Activity
Max Penet
March 15, 2015 at 8:55 PM
Right, I thought it might have been a regression, but wasn't sure at all. It seems it would be safe to change the current behavior, I doubt it would break any ones code.
Ghadi Shayban
March 15, 2015 at 8:40 PM
1.2 - current all behave this way, doesn't seem like a recent change.
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: