Hi,
I thought {} is always read as the same object (i.e. clojure.lang.PersistentArrayMap/EMPTY). In fact, however, it is read as a different object each time:
user=> (identical? (read-string "{}") (read-string "{}"))
false
user=> (identical? (read-string "{}") clojure.lang.PersistentArrayMap/EMPTY)
false
user=>
Although not a problem itself, this causes some weird behaviors (which themselves may also not be a real problem).
For example, the following can happen in REPL, which is ultimately caused by the behavior above.
user=> (identical? {} {})
true
user=> (def x (identical? {} {}))
#'user/x
user=> x
false
user=>
I'm not sure whether these behaviors should be fixed or we can leave them as they are. Do you have any suggestions?
Thanks,
Shogo