From 7ba838c438e01466cd6a848b582c741f7f3225eb Mon Sep 17 00:00:00 2001 From: vindarel Date: Tue, 27 Aug 2024 11:43:14 +0200 Subject: [PATCH] equality: on static analysis and performance up front --- equality.md | 1 + 1 file changed, 1 insertion(+) diff --git a/equality.md b/equality.md index 7f15de9..48c4e66 100644 --- a/equality.md +++ b/equality.md @@ -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`)