Re:Erg: a statically typed language that is Python compatible
by dexterlemmer on Friday August 19, 2022 @04:00PM
(#32525375)
I don't see the connection between white space in PLs and parenthesis in math.
On the other hand: Let's consider what the Python-like version of math actually look like:
f(x) = :
x, if x > 0
-x/2, if x < 0 and x is even
0, otherwise
In stead of: __
/
| x, if x > 0
f(x) = < -x/2, if x < 0 and x is even
| 0, otherwise
\__
The latter is, of course how math actually looks.
It's not noise, though. It protects me from common whitespace issues like careless copying/pasting, style differences between me and other developers, and IDE/OS settings.
It's also just easier to scan. Imagine if we did the same thing with math:
Look at that noise! We can get rid of some of those symbols, right? Let's replace parentheses with whitespace instead. So now it's denser and I typed fewer characters, but it's harder to scan because my eyes don't register " " as quickly and easily as they register "{".