Re: Add intersections and unions to Set

2013-04-02 Thread Mariusz Nowak
in context: http://old.nabble.com/Add-intersections-and-unions-to-Set-tp35134737p35243086.html Sent from the Mozilla - ECMAScript 4 discussion mailing list archive at Nabble.com. ___ es-discuss mailing list es-discuss@mozilla.org https

Re: Add intersections and unions to Set

2013-03-29 Thread Peter Michaux
On Mon, Mar 4, 2013 at 10:56 AM, Tab Atkins Jr. jackalm...@gmail.com wrote: On Mon, Mar 4, 2013 at 10:08 AM, al...@instantbird.org wrote: It would be useful to be able to form the intersection and the union of two Sets. These are natural operations that are currently not part of the API

Re: Add intersections and unions to Set

2013-03-05 Thread David Bruant
I agree on the need but forsee problems with parametrized equivalence operator [1][2] like which comparator should be used for the union of 2 sets with different comparators? The need for set intersection/union/minus/etc. feels more important than the need to parametrized the comparator.

Fwd: Add intersections and unions to Set

2013-03-05 Thread Jason Orendorff
On Tue, Mar 5, 2013 at 8:15 AM, David Bruant bruan...@gmail.com wrote: I agree on the need but forsee problems with parametrized equivalence operator [1][2] like which comparator should be used for the union of 2 sets with different comparators? I vote TypeError. If I really do intend to mix

Re: Add intersections and unions to Set

2013-03-05 Thread Tab Atkins Jr.
On Tue, Mar 5, 2013 at 8:53 AM, Jason Orendorff jason.orendo...@gmail.com wrote: On Tue, Mar 5, 2013 at 8:15 AM, David Bruant bruan...@gmail.com wrote: I agree on the need but forsee problems with parametrized equivalence operator [1][2] like which comparator should be used for the union of 2

Add intersections and unions to Set

2013-03-04 Thread aleth
It would be useful to be able to form the intersection and the union of two Sets. These are natural operations that are currently not part of the API (http://wiki.ecmascript.org/doku.php?id=harmony:simple_maps_and_sets). Similar methods would make sense for Map, but one would have to think about

Re: Add intersections and unions to Set

2013-03-04 Thread Tab Atkins Jr.
On Mon, Mar 4, 2013 at 10:08 AM, al...@instantbird.org wrote: It would be useful to be able to form the intersection and the union of two Sets. These are natural operations that are currently not part of the API (http://wiki.ecmascript.org/doku.php?id=harmony:simple_maps_and_sets). Similar

Re: Add intersections and unions to Set

2013-03-04 Thread Claude Pache
The Set constructor accepts an iterable (including an Array and a Set) as an argument to populate the newly-constructed Set with several values. There should also be the possibility to add or remove multiple elements of an already-constructed Set. That covers unions and differences, but it is

Re: Add intersections and unions to Set

2013-03-04 Thread Claude Pache
Le 4 mars 2013 à 23:37, Claude Pache claude.pa...@gmail.com a écrit : The Set constructor accepts an iterable (including an Array and a Set) as an argument to populate the newly-constructed Set with several values. There should also be the possibility to add or remove multiple elements of