Summary of equality checking
Several different senses of equality that depends on the objects’ data types
- EQ, EQL, =, EQUAL, EQUALP
The choice of the right predicate is generally clear: you know the objects’ data types, and there is only one appropriate equality checker:
- EQ for symbols
- EQL for symbols, characters
- = for numbers
- EQUAL for strings, lists, arrays
- EQUALP for structure instances
If you declare a structure, it never hurts to declare a special-purpose equality tester and use it