On Mon, Oct 13, 2014 at 3:22 PM, Domenic Denicola < [email protected]> wrote:
> From: es-discuss [mailto:[email protected]] On Behalf Of > Allen Wirfs-Brock > > > An old discussion. See: > > These only address the `forEach` method though, and not the strange design > of `entries()`, `values()`, and `keys()`. I guess a reusability argument > could be made, but it seems strange to drive the API with the idea of > wanting to reuse a Set in places people expect a Map. > > Yeah, that's the purpose of an abstraction -- to hide implementation details. `Set`s expose implementation details. Unless it's really much easier to reuse the whole iteration protocol, it's _probably_ will be fine (still again will be many confusions initially). But if it's easy to set default `@@iterator` of `Sets` to just `values`, and kill the `keys()` and `entries()`, it would be better. Although, once this is done, then the `againValue` parameter won't make sense in the callback and will need to be killed as well. Dmitry
_______________________________________________ es-discuss mailing list [email protected] https://mail.mozilla.org/listinfo/es-discuss

