Domenic Denicola wrote:
From: Brendan Eich [mailto:[email protected]]
> 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
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss