Re:Parsing R code: Freedom of expression is not always a goo...
by mst on Tuesday June 14, 2022 @11:06AM
(#31740587)
I genuinely really like it - strict left-to-right or strict right-to-left are so much more predictable at least for arithmetical type expressions (I might still prefer specific precedences for =/==/etc.).
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.
Re:Parsing R code: Freedom of expression is not always a goo...
by yakubin on Tuesday June 14, 2022 @12:36PM
(#31741952)
I've just started reading about APL, so maybe I'm wrong, but I think there is one caveat: you need to know which operators are monadic, and which are dyadic, because if op is monadic, then it may be:
A (op (B (op (C (op D)))))
[0]: https://en.cppreference.com/w/c/language/operator_precedence