On Sun 09 Jun 2013 11:34, Jason Orendorff <[email protected]> writes:
> I think it's a mistake for iterators not to be iterable.
I agree, FWIW.
I think I would go farther and suggest that _only_ iterators be
iterable. That way, the RHS of a for-of is expected to be an iterator.
In the worst case you end up having:
var a = [1, 2, 3, 4]
for (let x of values(a))
...
instead of
for (let x of a)
...
which to my eye is better anyway. Making an "itertools"-like library
difficult is a definite drawback of the current spec.
Andy
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss