Skip to content

Commit

Permalink
equality: on static analysis and performance up front
Browse files Browse the repository at this point in the history
  • Loading branch information
vindarel committed Aug 29, 2024
1 parent a3c4f90 commit 7ba838c
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions equality.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ In short:
- `=` is only for numbers and `equal` is the equality predicate that does what you expect on many things.
- you can't overload built-in operators such as `=` or `equal` for your own classes, unless you use a library.
- when you manipulate sequences of strings with functional built-ins (`remove-if`, `find`…) and you are surprised to get no results, you probably forgot the `:test` key argument: `(find "foo" '("hello" "foo") :test #'equal)`.
- not using a generic predicate gives better static analysis and performance.


## `=` is for numbers (beware of `NIL`)
Expand Down

0 comments on commit 7ba838c

Please sign in to comment.