Re: Set API

2014-11-19 Thread Dmitry Soshnikov
(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

Re: Set API

2014-10-14 Thread Axel Rauschmayer
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

Re: Set API

2014-10-14 Thread Erik Arvidsson
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 a...@rauschma.de wrote: Are we OK with this? Seems like removing `entries`, `keys` and providing own

Re: Set API

2014-10-14 Thread Dmitry Soshnikov
On Tue, Oct 14, 2014 at 11:42 AM, Axel Rauschmayer a...@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

RE: Set API

2014-10-13 Thread Domenic Denicola
From: Brendan Eich [mailto:bren...@mozilla.org] Domenic Denicola wrote: That said, Set is shipping in every major browser so it's not going to get fixed now. Why do you say that? I would guess that, via the usual `if (!window.Set) { window.Set = ... }` polyfills , there is a nontrivial

Re: Set API

2014-10-13 Thread Allen Wirfs-Brock
An old discussion. See: https://esdiscuss.org/topic/set-and-map-additions-in-the-latest-draft https://esdiscuss.org/notes/2012-07-26 (section heading: Map and Set methods: conclusion) https://bugs.ecmascript.org/show_bug.cgi?id=591 Allen On Oct 10, 2014, at 4:12 PM, Rick Waldron wrote:

Re: Set API

2014-10-13 Thread Dmitry Soshnikov
On Mon, Oct 13, 2014 at 8:43 AM, Allen Wirfs-Brock al...@wirfs-brock.com wrote: An old discussion. See: https://esdiscuss.org/topic/set-and-map-additions-in-the-latest-draft https://esdiscuss.org/notes/2012-07-26 (section heading: Map and Set methods: conclusion)

RE: Set API

2014-10-13 Thread Domenic Denicola
From: es-discuss [mailto:es-discuss-boun...@mozilla.org] 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

Re: Set API

2014-10-13 Thread Dmitry Soshnikov
On Mon, Oct 13, 2014 at 3:22 PM, Domenic Denicola dome...@domenicdenicola.com wrote: From: es-discuss [mailto:es-discuss-boun...@mozilla.org] On Behalf Of Allen Wirfs-Brock An old discussion. See: These only address the `forEach` method though, and not the strange design of `entries()`,

Re: Set API

2014-10-13 Thread Rick Waldron
On Monday, October 13, 2014, Domenic Denicola dome...@domenicdenicola.com wrote: From: es-discuss [mailto:es-discuss-boun...@mozilla.org javascript:;] On Behalf Of Allen Wirfs-Brock An old discussion. See: These only address the `forEach` method though, and not the strange design of

Re: Set API

2014-10-13 Thread Dmitry Soshnikov
On Mon, Oct 13, 2014 at 4:25 PM, Rick Waldron waldron.r...@gmail.com wrote: On Monday, October 13, 2014, Domenic Denicola dome...@domenicdenicola.com wrote: From: es-discuss [mailto:es-discuss-boun...@mozilla.org] On Behalf Of Allen Wirfs-Brock An old discussion. See: These only

Set API

2014-10-10 Thread Dmitry Soshnikov
Hi, (sorry I again probably too late, if the API is already locked, very likely it has been discussed and approved, please let me know) The API of `Set`s seems in inconvenient way exposes things that relates only to implementation details, but which doesn't make big sense at abstraction usage

RE: Set API

2014-10-10 Thread Domenic Denicola
18:56 To: es-discussmailto:es-discuss@mozilla.org Subject: Set API Hi, (sorry I again probably too late, if the API is already locked, very likely it has been discussed and approved, please let me know) The API of `Set`s seems in inconvenient way exposes things that relates only

Re: Set API

2014-10-10 Thread Brendan Eich
Domenic Denicola wrote: That said, Set is shipping in every major browser so it's not going to get fixed now. Why do you say that? /be ___ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss

Re: Set API

2014-10-10 Thread Dmitry Soshnikov
On Fri, Oct 10, 2014 at 4:09 PM, Brendan Eich bren...@mozilla.org wrote: Domenic Denicola wrote: That said, Set is shipping in every major browser so it's not going to get fixed now. Why do you say that? Yeah, since the spec normally changes in some small parts, as e.g. with recent

Re: Set API

2014-10-10 Thread Dmitry Soshnikov
On Fri, Oct 10, 2014 at 4:12 PM, Rick Waldron waldron.r...@gmail.com wrote: On Friday, October 10, 2014, Dmitry Soshnikov dmitry.soshni...@gmail.com wrote: Hi, (sorry I again probably too late, if the API is already locked, very likely it has been discussed and approved, please let me

Re: Set API

2014-10-10 Thread Dmitry Soshnikov
On Fri, Oct 10, 2014 at 4:13 PM, Dmitry Soshnikov dmitry.soshni...@gmail.com wrote: On Fri, Oct 10, 2014 at 4:09 PM, Brendan Eich bren...@mozilla.org wrote: Domenic Denicola wrote: That said, Set is shipping in every major browser so it's not going to get fixed now. Why do you say that?

Re: Set API

2014-10-10 Thread Rick Waldron
On Friday, October 10, 2014, Dmitry Soshnikov dmitry.soshni...@gmail.com wrote: On Fri, Oct 10, 2014 at 4:09 PM, Brendan Eich bren...@mozilla.org javascript:_e(%7B%7D,'cvml','bren...@mozilla.org'); wrote: Domenic Denicola wrote: That said, Set is shipping in every major browser so it's not