Hacker News new | past | comments | ask | show | jobs | submit login

Infix 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.




No, 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.


Um, what? How would you tell the difference between (f 2 (g 3 4)) and (g (f 2 3) 4)?




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: