With good tooling this is not a problem. Try the demos here: http://treenotation.org/sandbox/build/. Make some indentation errors. It's very hard to ignore all the help the editor gives you.
> And elegant composition is impossible with infix notation unless -- you add parens again.
This is a valid criticism. I've seen some folks working on this though, and I expect we'll see a new elegant solution.
>> And elegant composition is impossible with infix notation unless -- you add parens again.
> This is a valid criticism.
Is it? What is an example? (One I could think of below seems solvable)I was thinking of "elegant composition" of subexpressions. Or, in other words, inline Trees/S-Expressions.
You'll note that most code people write in almost any language is prefix anyway. `foo(bar, baz)` isn't infix; it's prefix with the operator placed to the left of the paren.
f(a b) == (f a b)
{a f b} == (f a b)
+ some edge cases {a b}=(a b) {a}=(a) {}=() etc if 1:
<tab>if 0:
<tab><tab>print(1)
<spaces*n>print(2)
could print 2 if mixing tabs and spaces were allowed. was it ever?Is elegant composition possible with prefix notation and some whitespace and indentation instead of parentheses everywhere?
I think it might be.