To add the answers of Alex and Stuart, Clojure characters cannot be identical? if they = mainly because they can carry metadata. Two characters that have the same components .name and .namespace but different metadata will be = , but not identical? .
Can we assume that everything can be organized so that two characters with the same metadata, namespace and name are always identical? , but these are (1) two big problems for real gain (since you still have Symbols = characters, but not identical? ), (2) contrary to the idea that types that can carry metadata should usually be compared for equal value (to which metadata does not contribute), while the actual equality of the pointer should be reserved for special situations (mainly including interop).
Note that Clojure Keywords are a separate type for which = really equivalent equivalent identical? . (Therefore, they cannot have attached metadata.)
MichaΕ Marczyk
source share