3 ms·
It's not so much an aversion to parentheses as an aversion to nothing but parentheses. Other languages use other brackets to indicate different contexts, but s-
by krapp 4y ago
It's not so much an aversion to parentheses as an aversion to nothing but parentheses. Other languages use other brackets to indicate different contexts, but s-expressions can more difficult to read. The idiom of putting all of your end parens on a single line doesn't help.
And for most people, the mild convenience of readability is preferable to the consistent semantics.
- kazinator 4y ago> The idiom of putting all of your end parens on a single line doesn't help. Yes it does; doing it any other way is strictly worse regardless of where you stand on parentheses as such.
- pfdietz 4y agoI don't think the syntax has anything to do with the outcome. Some people like to complain about it, but it's just meaningless noise.
- Oreb 4y agoWhat’s the problem with having the end parens on a single line? I never understood why languages with curly brace syntax don’t do the same. A line of code containing nothing but a curly brace seems like a waste of screen real estate to me. It contains absolutely no information (the end of the block can be seen by indentation anyway).
- krapp 4y agoOne could just as easily write s-expressions using whitespace, so why bother with parens at all? Because the human brain is a pattern-matching organ and sometimes redundancy in a signal is useful. I've never understood the lispers' insistence that saving "screen real estate" is a primary concern. Source code is meant to be read, and the more easily code is read, the more utility is has.
- Oreb 4y agoSource code is indeed meant to be read, and at least to me, low information density seriously hurts readability. I prefer both Python-style indentation based syntax and multiple parens at the end of the line over C-style syntax with closing braces alone on a line. If I write code in a language with curly brace syntax and I don’t have to share the code with others, I prefer to use multiple closing braces on the same line – like Lisp parens – because of improved readability.
- pfdietz 4y agoParens allow an editor to create the proper indentation. You can think of Lisp's paren syntax as the syntactic analogue of Lisp's very simple static type system. To get macros to work with a conventional grammar's complexity is much more annoyingly complex.