Array subclassing, .map and iterables (Re: Jan 30 TC39 MeetingNotes)

Brendan Eich brendan at mozilla.com
Sun Feb 17 13:07:15 PST 2013


Claus Reinke wrote:
> More immediately relevant for this thread, I would like to see
>
>    Array < Container
>
> with map, from, filter, and perhaps some others, moving from
> Array to Container. Then Map and Set would be Containers, supporting 
> operations currently limited to Array 

This is not gonna happen for several reasons, one being backward 
incompatibility.

It's also unnecessary. The generic methods could (and should, some think 
-- I prototyped this years ago in SpiderMonkey) have their |this| 
parameters uncurried and be provided as functions. That would be a 
better route than OOP tyranny of hierarchy.

/be


More information about the es-discuss mailing list