Brendan Eich (2014-10-06T03:44:47.000Z)
Domenic Denicola wrote:
> From: Brendan Eich [mailto:brendan at mozilla.org]
>
>> >  But entries returns an iterator, and if we define %IteratorPrototype% to create a new instance of the right class given its|this|  parameter, in this case Map and not MapIterator, then no need for the new Map() wrapper.
>
> This seems like it'd involve too much machinery and give unexpected results.
>
> I'd expect `instance.map(...)` to return another one of `instance`. That is, given a MapIterator `i`, I'd expect `i.map(...)` to be another MapIterator, and not a Map like you are proposing.

Right, I was smoking something bad. The uniformity you describe is 
clearly the right solution.

This meansMap.prototype.mapetc. -- or %ItereablePrototype%.map if not 
Array.prototype.map etc. -- are the eager collection-generic companions.

/be
forbes at lindesay.co.uk (2016-02-01T13:01:16.080Z)
> This seems like it'd involve too much machinery and give unexpected results.
>
> I'd expect `instance.map(...)` to return another one of `instance`. That is, given a MapIterator `i`, I'd expect `i.map(...)` to be another MapIterator, and not a Map like you are proposing.

Right, I was smoking something bad. The uniformity you describe is clearly the right solution.

This means `Map.prototype.map` etc. -- or `%ItereablePrototype%.map` if not 
`Array.prototype.map` etc. -- are the eager collection-generic companions.