Re: `new Set()` or `new Map()` with more than one argument

2015-02-24 Thread Leon Arnott
>or perhaps we should have Set.of(...args) and Set.from(iterable) methods. I was under the impression that Array.of() was solely an apologetic patch over Array()'s broken arguments interpretation, and not really an apogee for future or present collection classes. Regarding the main topic: I pers

Re: `new Set()` or `new Map()` with more than one argument

2015-02-24 Thread Tab Atkins Jr.
On Tue, Feb 24, 2015 at 10:06 AM, Rick Waldron wrote: > On Tue Feb 24 2015 at 12:22:25 PM Mark S. Miller wrote: >> As always with proposals to extend arity -- even if reserved by a thrown >> error in a previous release -- how would you feature test for the extended >> functionality? >> >> I suspe

Re: `new Set()` or `new Map()` with more than one argument

2015-02-24 Thread Rick Waldron
On Tue Feb 24 2015 at 12:22:25 PM Mark S. Miller wrote: > As always with proposals to extend arity -- even if reserved by a thrown > error in a previous release -- how would you feature test for the extended > functionality? > > I suspect the awkwardness of feature testing is one of the reasons w

Re: `new Set()` or `new Map()` with more than one argument

2015-02-24 Thread Mark S. Miller
As always with proposals to extend arity -- even if reserved by a thrown error in a previous release -- how would you feature test for the extended functionality? I suspect the awkwardness of feature testing is one of the reasons why we have not previously added new functionality by extending arit

Re: `new Set()` or `new Map()` with more than one argument

2015-02-24 Thread Rick Waldron
On Tue Feb 24 2015 at 10:48:59 AM Allen Wirfs-Brock wrote: > > On Feb 24, 2015, at 5:52 AM, Axel Rauschmayer wrote: > > > I’ve accidentally created the wrong set a few times: > > > > ```js > > let set = new Set('red', 'green', 'blue'); > > // WRONG: same as new Set(['r', 'e', 'd']) > > ``` >

Re: `new Set()` or `new Map()` with more than one argument

2015-02-24 Thread Allen Wirfs-Brock
On Feb 24, 2015, at 5:52 AM, Axel Rauschmayer wrote: > I’ve accidentally created the wrong set a few times: > > ```js > let set = new Set('red', 'green', 'blue'); > // WRONG: same as new Set(['r', 'e', 'd']) > ``` > > Would it make sense to throw if either of the constructors `Set` and `Map