ES6 doesn't need opt-in

Gavin Barraclough barraclough at apple.com
Tue Jan 3 17:07:12 PST 2012


Ah, I see! - Thanks.

On Jan 3, 2012, at 4:58 PM, Brendan Eich wrote:

> On Jan 3, 2012, at 4:50 PM, Gavin Barraclough wrote:
> 
>> On Jan 3, 2012, at 4:42 PM, Brendan Eich wrote:
>> 
>>> On Jan 3, 2012, at 4:38 PM, Allen Wirfs-Brock wrote:
>>> 
>>>>> ArrayBindingPattern :
>>>>> 	[ Elision<opt> BindingRestElement<opt> ]
>>>>> 	[ BindingElementList , Elision<opt> BindingRestElement<opt> ]
>>>> 
>>>> It's a grammar bug.  Thanks for the proof reading...
>>> 
>>> The final <opt> cited above is the bug, right?
>>> 
>>> The first right-hand side still is enough to produce the [x] pattern.
>>> 
>>> /be
>> 
>> 
>> I assumed the bug was the presence of a literal comma?
> 
> No, compare to ArrayLiteral:
> 
> ArrayLiteral : // See 11.1.4
>    [ Elisionopt ]
>    [ ElementList ]
>    [ ElementList , Elisionopt ]
> 
> ElementList :  // See 11.1.4
>    Elisionopt AssignmentExpression
>    ElementList , Elisionopt AssignmentExpression
> 
> 
> Replace ArrayLiteral with ArrayBindingPattern, ElementList with BindingElementList, and AssignmentExpression with BindingRestElement.
> 
> /be



More information about the es-discuss mailing list