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
[email protected]
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to