Allen Wirfs-Brock wrote:
That said, I'd hate to see things like:
[,,,,,x] = someArray;
and even
[a,,y] = someArray;
can be easily missed.
It isn't clear to me that we are doing ES programmers (especially those
with poor eyesight) a favor by allowing such expressions. What is the
evidence with JS1.7 up. How much usage do we see of such holes?
If
{"5":x} = someArray;
and
{"0":a, "2":y} = someArray;
would be possible, there is probably little need for holes. In case of
[a,b,c,d,,f] = someArray;
one could always use (some conventional) anon-var, like _ (from Prolog):
[a,b,c,d,_,f] = someArray;
Herby
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss