Refutable destructuring

Brendan Eich brendan at
Tue Aug 13 18:42:38 PDT 2013

Allen Wirfs-Brock wrote:
> On Aug 13, 2013, at 2:31 PM, Brendan Eich wrote:
>> Andreas Rossberg wrote:
>>> As I said in my reply, I'm totally fine with what you describe in that
>>> mail. But correct me if I'm wrong, that_is_  refutable destructuring,
>>> isn't it? All you seem to drop is the optional irrefutable part (the
>>> '?' feature). That's why I am quite confused about Brendan's statement
>>> above.
>> Possibly I missed something (I was at the meeting on the 2nd and 3rd days but not day 1).
>> Allen, what does your latest draft do on
>>   var {p} = {};
>> Throw, or bind p to undefined?
> throws
> to bind to undefined you would say:
> var {p=undefined} = {};

Ok, then!

My apologies, Andreas, I was your champion in reviving refutable 
patterns for destructuring in ES6. I misheard things while at the meeting.


More information about the es-discuss mailing list