Backstory/rationale for disallowing -0 in Map keys and Sets?
ljharb at gmail.com
Thu Oct 11 02:21:17 UTC 2018
The unfortunate result, however, is that a subclass that is *more*
restrictive than the base class is not possible to write robustly - namely,
if someone does `Set.prototype.add.call`, they'll bypass any of the
criteria you've set up in the subclass.
I would have vastly preferred that the base class for both Map and Set used
SameValue, and I'd have found a "SameValueZero" subclass to be much more
trivial to write robustly than a "SameValue" subclass is now. That ship,
unfortunately, has long since sailed.
On Wed, Oct 10, 2018 at 11:09 AM T.J. Crowder <
tj.crowder at farsightsoftware.com> wrote:
> On Wed, Oct 10, 2018 at 7:03 PM Allen Wirfs-Brock
> <allen at wirfs-brock.com> wrote:
> > Yes, exactly.
> -- T.J. Crowder
> es-discuss mailing list
> es-discuss at mozilla.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the es-discuss