On Thu, Jul 5, 2012 at 2:09 PM, Allen Wirfs-Brock <[email protected]> wrote:
>> Map may win at some point, who knows? It's not winning if one wants an 
>> array, numeric indexing, .length, the usual prototype methods.
>
> We could consider also have "dense" interators available:
>
>      for (let v of array.denseValues) console.log(v);

This makes sense to me, but most arrays are meant to be dense in
practice. So perhaps it makes more sense to add methods specifically
for sparse arrays, making developers type more characters in the rare
case rather than the common case:

    for (let v of array.sparseValues()) ...;
    for (let [i, v] of array.sparseItems()) ...;

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

Reply via email to