Hi Sean,

Yes, I'm interested in this possibility as well. It'll probably take some 
careful working-through of the details to figure out exactly when/where this is 
doable, but it's on my radar.

Thanks,
Dave

On Apr 1, 2011, at 7:37 AM, Sean Eagan wrote:

> Why not allow the spread operator to appear earlier (still just once
> though) in ArrayPatternList in
> http://wiki.ecmascript.org/doku.php?id=harmony:destructuring?  This
> could be useful when there is interesting stuff at the end and not
> interesting and/or variable length stuff earlier
> 
> // variable length early segment
> function(first, ...variableLength, last){}
> 
> // not interesting early segment
> function(interesting, ...notInteresting, alsoInteresting){}
> 
> // identifier omission may be useful in this case
> function(interesting, ..., alsoInteresting){}
> 
> // array literal forms
> [first, ...variableLength, last] = arr;
> [interesting, ...notInteresting, alsoInteresting] = arr;
> [interesting, ..., alsoInteresting] = arr;
> 
> Thanks,
> Sean Eagan
> _______________________________________________
> es-discuss mailing list
> es-discuss@mozilla.org
> https://mail.mozilla.org/listinfo/es-discuss

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

Reply via email to