On Tue, Feb 14, 2012 at 1:20 PM, Tab Atkins Jr. <[email protected]>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
"length".

OTOH, some bozo (me) once proposed <
http://wiki.ecmascript.org/doku.php?id=conventions:isarraylike>. Hopefully
no one followed my advice ;).

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

Reply via email to