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

>> ...
> 
> 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.
> 
> 

But note that ES.next ArrayLiterals are different from ArrayBindingPatterns. 
the ... in ArrayLiteral is the spread operator and can occur multiple times and 
in any position.  The ... in ArrayBindingPattern is the rest operator and can 
only occur once at the end of the list.

Allen


> 

_______________________________________________
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to