Set API

Dmitry Soshnikov dmitry.soshnikov at gmail.com
Wed Nov 19 16:51:55 PST 2014


(For the history of this thread to refer to it later)

At the meeting it was decided not to remove `keys()` and `entries()`, and
keep the `(value, againValue, set)` callback params signature.

The reasons:

- Consistency with maps and to reuse callbacks from arrays;
- Even if it may seem a "wrong" Set abstraction, it's too late to exclude
from ES6.

Dmitry

On Tue, Oct 14, 2014 at 1:19 PM, Erik Arvidsson <erik.arvidsson at gmail.com>
wrote:

> Removing Set.prototype.entries and Set.prototype.keys might make sense.
> I'm not really sure why we added them. Probably for consistency.
>
> On Tue, Oct 14, 2014 at 2:42 PM, Axel Rauschmayer <axel at rauschma.de>
> wrote:
>
>> Are we OK with this? Seems like removing `entries`, `keys` and providing
>> own default `@@iterator` for `Set` which should be just `values()` would
>> make it more sense from the abstraction usage perspective.
>>
>>
>> W.r.t. your last suggestion: that’s how the spec does it. Anything else
>> would definitely not have made sense.
>>
>>
>> https://people.mozilla.org/~jorendorff/es6-draft.html#sec-set.prototype-@@iterator
>>
>> --
>> Dr. Axel Rauschmayer
>> axel at rauschma.de
>> rauschma.de
>>
>>
>>
>>
>> _______________________________________________
>> es-discuss mailing list
>> es-discuss at mozilla.org
>> https://mail.mozilla.org/listinfo/es-discuss
>>
>>
>
>
> --
> erik
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20141119/cd748442/attachment.html>


More information about the es-discuss mailing list