2 ms·
A big part of the aesthetics is that the specific glyphs for parentheses are curved in a way that suggests enclosure. Suppose we replace ( with ^ and ) with $.
by kazinator 4y ago
A big part of the aesthetics is that the specific glyphs for parentheses are curved in a way that suggests enclosure.
Suppose we replace ( with ^ and ) with $. The visual aesthetics is ruined. Or suppose we swap them: ) means ( and vice versa. Ditto.
Let's try it:
(let ((s nil))
(dotimes (i 16)
(setq s (rbt-insert (1+ i) s)))
(pp s))
^ is opening, $ is closing:
^let ^^s nil$$
^dotimes ^i 16$
^setq s ^rbt-insert ^1+ i$ s$$$
^pp s$$
) is opening, ( is closing:
)let ))s nil((
)dotimes )i 16(
)setq s )rbt-insert )1+ i( s(((
)pp s((
the reversal is slightly better than using random glyphs, because we can pretend that ) ( is suggesting closure in a different way. I don't think I could get used to this no matter how much time I put into it.
I can't escape the conclusion that the shape of the glyphs is important. The parens, being shaped the way they are, are making the code readable.
- abrax3141 4y agoWow. That’s really interesting. I wonder to what extent this is because we use them for natural writing (like this)? Also, note that the various boxer-derivatives use complete enclosure. But that just looks busy and rigid. The parens have both enclosure and fluidity.