by hoosieree · 4y ago · 0 comments
A op B op C op D
No matter what _op_ is, it parses right-to-left: A op (B op (C op D))
Much nicer than having to learn a subtly-different version of C's already convoluted operator precedence[0] with each new language that comes out.[0]: https://en.cppreference.com/w/c/language/operator_precedence
However at this point something PEMDAS-like seems to be substantially easier to understand for most people since it's AFAICT the common rule taught in (high school) mathematics these days.
Trade-offs all the way down, as ever.
A (op (B (op (C (op D)))))