basilisp
basilisp copied to clipboard
Separate hash map elements with comma in printer output
Currently (Basilisp 0.4.0) hash maps are printed without kv-pairs separated in any way, making it hard to know which is a key and which is a value:
basilisp.user=> {:1 :2 :3 :4 :5 :6 :7 :8 :9 :10}
{:1 :2 :3 :4 :5 :6 :7 :8 :9 :10}
Clojure adds convenient comma in between (example with Babashka v1.12.203 REPL):
user=> {:1 :2 :3 :4 :5 :6 :7 :8 :9 :10}
{:1 :2, :3 :4, :5 :6, :7 :8, :9 :10}
This would make reading complex hash maps easier when printing them out. The reader discards the commas (as Clojure does) so copy-pasting printed hash maps with commas for evaluation works fine.
Issue copy-pasted from https://github.com/phel-lang/phel-lang/issues/957.