Backstory/rationale for disallowing -0 in Map keys and Sets?

Jordan Harband ljharb at
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 ``, 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> wrote:

> On Wed, Oct 10, 2018 at 7:03 PM Allen Wirfs-Brock
> <allen at> wrote:
> > Yes, exactly.
> Thanks!
> -- T.J. Crowder
> _______________________________________________
> es-discuss mailing list
> es-discuss at
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the es-discuss mailing list