6 ms·
> For * and +, there's a agreed upon order of operations So... we collectively made a choice and wrote it down, then? I think you whooshed on the point. The
by ajross 2y ago
> For * and +, there's a agreed upon order of operations
So... we collectively made a choice and wrote it down, then? I think you whooshed on the point. The if/else ambiguity is just a precedence rule, like many others in the expression grammar of every (well, every non-lisp) language that exists.
- kibwen 2y agoNeeding to specify associativity for operations that have absolutely no reason to be ambiguous in the first place is a flaw of language design. It's needless complexity. Isn't C supposed to be a "simple" language?
- ajross 2y agoYou lost me. How does if/else have "no reason to be ambiguous in the first place". It's ambiguous in the actual language from which it was derived. English itself has no syntax for expressing a nested "if" such that you can match the right "else".