Rick Waldron (2015-02-24T18:06:20.000Z)
On Tue Feb 24 2015 at 12:22:25 PM Mark S. Miller <erights at google.com> 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 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?
>

TBH, I've never encountered the issue that Dr. Rauschmayer reported—so I'm
not convinced that it's necessary to do anything about it at all. I only
made the suggestion because I remembered the the user-defined comparator,
and figured that a thrown exception would prevent any code, that
accidentally relied on args > 1 being silently ignored, from coming into
existence. So forget that, because you're right and this sucks:

  var m;
  try {
    m = new Map(..., comparator);
  } catch (e) {
    m = new Map(...);
  }

No thanks to that—I'd rather risk the rare cases in which args > 1 are
silently ignored and bugs hopefully caught by well written tests.

Rick
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20150224/b47fd596/attachment.html>
d at domenic.me (2015-03-06T00:54:28.026Z)
TBH, I've never encountered the issue that Dr. Rauschmayer reported—so I'm
not convinced that it's necessary to do anything about it at all. I only
made the suggestion because I remembered the the user-defined comparator,
and figured that a thrown exception would prevent any code, that
accidentally relied on args > 1 being silently ignored, from coming into

existence. So forget that, because you're right and this sucks:

```js
  var m;
  try {
    m = new Map(..., comparator);
  } catch (e) {
    m = new Map(...);
  }
```

No thanks to that—I'd rather risk the rare cases in which args > 1 are silently ignored and bugs hopefully caught by well written tests.