Hi, I’ve been thinking equality lately, and I wrote ‘equal protection under Eq law’.
Here’s the short version: The relationship given to
Long should be exactly the same as the relationship third-party library like Spire can write
Rational with the first-class numeric types.
- We should make
1 == 1Lan error under
- We should allow custom types to participate in constant expression conversion using
Besides making the comparison of
Long more consistent with what’s available to
UInt etc, the benefit for this is making
== closer to
Any#equals method. We won’t be able to immediately remove cooperative equality, but this opens the possibility to remove cooperative equality down the line if / when strict equality becomes the default mode.
Previous discussion on this topic - Can we get rid of cooperative equality?