[CLJ-1366] The empty map literal is read as a different map each time Created: 01/Mar/14 Updated: 15/May/17
|Affects Version/s:||Release 1.5, Release 1.6|
As reported here (https://groups.google.com/forum/?hl=en#!topic/clojure-dev/n83hlRFsfHg), the empty map literal is read as a different map each time.
Making the reader return the same empty map when it reads an empty map is expected to improve some memory efficiency, and also lead to consistency with the way other collection literals are read in.
Cause: LispReader calls RT.map() with an empty array when it reads an empty map, and RT.map() in turn makes a new map unless its argument given is null.
Approach: make RT.map() return the same empty map when the argument is an empty array as well, not only when null
Prescreened by: Alex Miller
|Comment by Shogo Ohta [ 01/Mar/14 2:59 AM ]|
Sorry, the patch 0001-make-the-reader-return-the-same-empty-map-when-it-re.patch didn't work.
The updated patch 0002-make-the-reader-return-the-same-empty-map-when-it-re.patch works, but I'm afraid it'd be beyond the scope of this ticket since it modifies RT.map() behavior a bit.