Re:We need to talk about parentheses
by zarzavat on Monday February 12, 2024 @11:38AM
(#39346919)
There are of course operations with unclear precedence relationships and it’s completely reasonable to want to force parentheses when composing those operations.
However, there are also operations with crystal clear precedence relationships, such as logical conjunction and comparison, and in that case it has to be asked what exactly would the parentheses be there for?
In lisp the answer is: to enable syntactic homogeneity and to enable macros.
But in other languages like Python that don’t have sexpr based syntax, parenthesizing everything would just be pointlessly unreadable.
However, there are also operations with crystal clear precedence relationships, such as logical conjunction and comparison, and in that case it has to be asked what exactly would the parentheses be there for?
In lisp the answer is: to enable syntactic homogeneity and to enable macros.
But in other languages like Python that don’t have sexpr based syntax, parenthesizing everything would just be pointlessly unreadable.