The Equality operators model the Equivalence relation:
- is parallel to (for affine spaces)
- is in bijection with
The Equality operators are a subset of the comparison operator.
The = symbol was designed to be two lines of visibly equal length.
- and execute conditionally.
|==|| loose-equals, same value, two different Type
such as '2' in number of '2' as string are loose-equals
|===||strict-equals, same value, same type|
|<>||loose not-equals (should be deprecated)|
|is not||negated object identity|
- Approximately equal
<MATH> a \approx b </MATH>
Evil in loop predicate
The equality operator is evil in a loop predicate.
The common error is to find a == in the code where there should have been a >= or a <=