fset icon indicating copy to clipboard operation
fset copied to clipboard

map syntax too complicated

Open lispegistus opened this issue 2 years ago • 1 comments

The default map syntax is too complicated and makes working with nested maps needlessly difficult. Compare:

#{| (:CHILD #{| (:CHILD #{| (:CHILD NIL) |}) |}) |}

with the equivalent clojure:

{:child {:child {:child nil}}}

)|})|})|} vs }}} is a no-contest in terms of convenience and readability, especially considering that I'll probably be working with structures with quite a bit more nesting than just 3 levels.

I'm planning on overriding print-object and modifying the read-table in my own project for my own convenience without modifying FSet. My question is would my design, if it were implemented in a backwards compatible way, be acceptable upstream? I'm currently thinking of something like this:

#M{:child #M{:child #M{:child nil}}}

With possibly a special variable to control how the maps should be printed.

lispegistus avatar Mar 14 '23 10:03 lispegistus

What would it look like when a map contains more than one pair?

slburson avatar Oct 19 '23 06:10 slburson