This is all unwanted "innovation". We have holes in arrays, and in SpiderMonkey and Rhino we've had holes in destructuring array patterns for years. No one got confused or went blind. We should stop nanny-ing about holes.

Some of you don't like holes, but they're not going away in arrays. They are useful in array patterns to avoid _ or junk bindings. That's enough to keep them, rather than straining to invent more cumbersome ad-hoc replacements.

/be

Herby Vojčík <mailto:[email protected]>
February 2, 2012 11:49 AM




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

_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to