|
|
|
|
|
by reitzensteinm
2166 days ago
|
|
In Clojure land, equal but not identical? symbols don't cause any issues; they can be used interchangeably as map keys, etc. It won't impact code correctness, just potentially cause slowdowns. With that said, I always thought symbols would intern, but that's not the case. It is true with keywords, however. (identical? (clojure.edn/read-string "x") 'x) => false (= (clojure.edn/read-string "x") 'x) => true (identical? (clojure.edn/read-string ":x") :x) => true |
|
They are, at best, cargo culted symbols: character strings with a tag bit which says "read/print me without quotes, so I visually look like something out of Lisp".