An array destructing specification choice

Brendan Eich brendan at mozilla.com
Sat Nov 12 11:57:21 PST 2011


On Nov 12, 2011, at 12:48 AM, Claus Reinke wrote:

>> Embedded spreads is already in the ES6 draft for  both array literals
>> and argument lists.  I'm not at all sure that embedded rests in
>> destructurings are such a good idea.  Just to start with, what does this mean:
>> 
>>  [a,b,...r,c,d = [1,2,3]
>> 
>> ..
>> This sort of destructuring is not real pattern matching. ..
> 
> I think this is the important point. Many of us who like "destructuring"
> are still being mislead by the name, and by our experience with proper
> pattern matching constructs.

You just used a different term, "pattern matching", than "destructuring" -- so why are you misled?


> - please rename the current state to "selection shorthand"

No thanks.

/be


More information about the es-discuss mailing list