Traditional S-expressions, by their definition, ignore most of whitespace; additionally, reading sexprs is always a linear operation without the need to backtrack by more than one character.
The suggestion from this post violates both assumptions by introducing a 2D structure to code. To quote this post's examples, it requires the multiline string in
(fst-atom """ trd-atom)
00001
00002
00003
"""
to be fully read before TRD-ATOM. It also forces the reading function to jump up and down vertically in order to read the structure in
* ( )
* e ( ) ( )
* q m ( ) p ( ) *
u a a o a 2 *
l w *
It gets worse/better. Since Racket allows you to hook your own reader in front of (or in place of) the default reader, you can have things like 2D syntax:
Truth be told, you can intercept the reader in Common Lisp, too, and here it actually makes some sense since the 2D value is immediately visually grokkable as an ASCII-art table. The proposed 2D sexpr notation does not have this.
I’ve seen dozens of attempts to make S-Exp “better” even the original M-Exp. I also did some experiments myself. But at the end, I come back to goo’ol s-exp. Seems to be a maximum (or minimum) found just perchance.
Not sure if that example helps. You can make any programming language hard to read without some basic formatting. The way I would write the sexpr would be:
(impl
(impl
p
(impl q r))
(impl
(impl p q)
(impl p r)))
It's clear when each section begins and ends and doesn't require complex parsing rules.
Traditional S-expressions, by their definition, ignore most of whitespace; additionally, reading sexprs is always a linear operation without the need to backtrack by more than one character.
The suggestion from this post violates both assumptions by introducing a 2D structure to code. To quote this post's examples, it requires the multiline string in
to be fully read before TRD-ATOM. It also forces the reading function to jump up and down vertically in order to read the structure in The author also states that is less readable than Then there's the ending passage:> we hope that the introduced complexity is justified by the data readability expressed this way.
I cannot force myself to read this post as anything but a very poor Befungesque joke.