Set length property
Brendan Eich
brendan at mozilla.org
Tue Feb 14 19:08:23 PST 2012
Tab Atkins Jr. wrote:
>> IME they're ducktyped by the presence of forEach (this is far from perfect).
>> > Length has nothing to do with iterability. What about generators?
>
> I don't want to go looking anything up right now, but I have lots of
> memories of things looking for the presence of "length" to denote an
> array-like.
Array-like != iterable.
Eager length is a problem for lazy lists (iterators).
/be
More information about the es-discuss
mailing list