Mark S. Miller (2015-02-24T17:22:24.000Z)
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 arity of existing
std functions. Though reserving by throwing does change the game somewhat.
Does it change the game enough?





On Tue, Feb 24, 2015 at 8:07 AM, Rick Waldron <waldron.rick at gmail.com>
wrote:

>
>
> On Tue Feb 24 2015 at 10:48:59 AM Allen Wirfs-Brock <allen at wirfs-brock.com>
> 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'])
>> > ```
>> >
>> > Would it make sense to throw if either of the constructors `Set` and
>> `Map` receives more than one argument?
>>
>> or perhaps we should have  Set.of(...args) and Set.from(iterable) methods.
>>
>
> +1
>
> Also, it occurs to me that specifying Set and Map to throw when there is
> greater than 1 argument would provide insurance for the comparator function
> argument. Sometime in the future, the operation could be relaxed to allow
> accepting that second argument.
>
> Rick
>
>
> _______________________________________________
> es-discuss mailing list
> es-discuss at mozilla.org
> https://mail.mozilla.org/listinfo/es-discuss
>
>


-- 
    Cheers,
    --MarkM
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20150224/401b40ce/attachment.html>
d at domenic.me (2015-03-06T00:54:10.094Z)
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 arity of existing
std functions. Though reserving by throwing does change the game somewhat.
Does it change the game enough?