Details
-
Type:
Defect
-
Status:
Open
-
Priority:
Minor
-
Resolution: Unresolved
-
Affects Version/s: Release 1.3
-
Fix Version/s: Approved Backlog
-
Component/s: None
-
Labels:None
Description
Per Rich in CLJ-799: "The point of print-dup is type preservation"
user=> (hash-map :k :v)
{:k :v}
user=> (type *1)
clojure.lang.PersistentHashMap
user=> (binding [*print-dup* true] (print-str *2))
"{:k :v}"
user=> (read-string *1)
{:k :v}
user=> (type *1)
clojure.lang.PersistentArrayMap
The cause is due to RT.map conditionally creating an array-map if the size is within the PersistentArrayMap.HASHTABLE_THRESHOLD.
Activity
Alexander Taggart
made changes -
| Field | Original Value | New Value |
|---|---|---|
| Summary | hash-maps print-dup as literal, but can be read as array-maps | hash-maps print-dup as literal, thus can be read as array-maps |
Aaron Bedra
made changes -
| Fix Version/s | Approved Backlog [ 10034 ] | |
| Waiting On | richhickey |
Rich Hickey
made changes -
| Waiting On | richhickey |