basilisp icon indicating copy to clipboard operation
basilisp copied to clipboard

Separate hash map elements with comma in printer output

Open jasalt opened this issue 2 months ago • 2 comments

Issue: https://github.com/basilisp-lang/basilisp/issues/1275

Dismiss global PRINT_SEPARATOR (empty/whitespace by default?) as hash map is a special case and benefits generally of the separator between pairs for readability.

Demo:

make repl
basilisp.user=> {:1 :2 :3 :4 :5 :6 :7 :8}
{:5 :6, :7 :8, :3 :4, :1 :2}

I'm not familiar of philosophy behind PRINT_SEPARATOR so improvement ideas are welcome. Maybe this variable could be overridden only when it has the empty default value? That way hash map would use comma separator as exception by default and the separator could be changed if wanted (is that something people would need to do?).

jasalt avatar Sep 22 '25 08:09 jasalt