If what you are suggesting is that checking for identity equality can exist independently of the Equatable
protocol this was part of the original pitch and is currently an "Alternative Considered". One reason we kept this inside Equatable
is to prevent against needing extra generic specialization overloads. Where a product engineer needs:
- One generic specialization for a type that is
Equatable
and isSpannable
. - One generic specialization for a type that is
Equatable
and is notSpannable
. - One generic specialization for a type that is not
Equatable
and isSpannable
.
Since we expect product engineers want isKnownIdentical
in-place of (or accompanying) the result of a ==
value operator we think keeping that in Equatable
is the better trade off for now.