# Language - Equality

### Table of Contents

## 1 - About

The Equality operators model the Equivalence relation:

- equality
- is parallel to (for affine spaces)
- is in bijection with
- isomorphy

The Equality operators are a subset of the comparison operator.

The = symbol was designed to be two lines of visibly equal length.

## 2 - Articles Related

## 3 - Usage

The equality operators as comparison operator are used in predicate (condition) expression in order to:

- filter
- and execute conditionally.

## 4 - Operator

Equality operator

Operation | Description |
---|---|

== | 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 |

<> | loose not-equals (should be deprecated) |

!== | strict not-equals |

is | object identity |

is not | negated object identity |

## 5 - Mathematics

- Approximately equal

<MATH> a \approx b </MATH>

## 6 - 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 <=

See: