2 ms·
For me it's just a matter of what you're used to. We're used to 2+2, and sin(x) so that's what we do. If you learned +(2,2) then that's what's more intuitive fo
by ajuc 9y ago
For me it's just a matter of what you're used to. We're used to 2+2, and sin(x) so that's what we do. If you learned +(2,2) then that's what's more intuitive for you. And with time you get used to new approaches anyway.
Also, infix has the unfortunate problem of requiring operator priorities to parse.
f(2, g(3, 4))
is impossible to misunderstand.
2 f 3 g 4
isn't.
- urethrafranklin 9y agoInfix doesn't require operator precedence, it's just something we've adopted from math. Notice that you've flattened the parse tree in the second example. A fair comparison would be: (2 f (3 g 4)) which is arguably how most sane engineers would write it.
- zumatic 9y agoNo, it requires precedence to distinguish between (2 f (3 g 4)) and ((2 f 3) g 4) > which is arguably how most sane engineers would write it I'm always wary of this sort of statement.
- urethrafranklin 9y agoUm, what? How would you tell the difference between (f 2 (g 3 4)) and (g (f 2 3) 4)?