ES6 doesn't need opt-in

Allen Wirfs-Brock allen at wirfs-brock.com
Tue Jan 3 16:53:06 PST 2012


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.

The current spec. draft is missing the second (of three) LHS rules that show up in ES5.1 for ArrayLiteral.  It believe the correct form should be:

ArrayBindingPattern :
[ Elisionopt BindingRestElementopt ]
[ BindingElementList ]
[ BindingElementList , Elisionopt BindingRestElementopt ]



Allen

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20120103/f4198482/attachment.html>


More information about the es-discuss mailing list