Set length property

Mark S. Miller erights at
Tue Feb 14 18:34:39 PST 2012

On Tue, Feb 14, 2012 at 1:20 PM, Tab Atkins Jr. <jackalmage at>wrote:

> 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.

If someone does look for examples, this would be helpful. The issue is
"array-like in what ways"? Other than being iteratable, Sets and Maps
aren't array-like in any other way I can think of. And "iteratable" is new
with ES6 so that can't be the commonality. OTOH, functions have a "length"
and they aren't array like in any way I can fathom. The possible confusion
with functions may have already deterred people from duck typing on

OTOH, some bozo (me) once proposed <>. Hopefully
no one followed my advice ;).

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the es-discuss mailing list