Declaration

Declared In

Declaration

Declared In

Equality implies substitutability. When x == y, x and
y are interchangeable in any code that only depends on their
values.

Class instance identity as distinguished by triple-equals ===
is notably not part of an instance's value. Exposing other
non-value aspects of Equatable types is discouraged, and any
that are exposed should be explicitly pointed out in
documentation.