Refutable destructuring

Allen Wirfs-Brock allen at
Tue Aug 13 15:16:36 PDT 2013

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?


to bind to undefined you would say:

var {p=undefined} = {};


More information about the es-discuss mailing list