News for hackers. Stuff that matters.
Re:Partial Operator Precedence by andrewla on Thursday November 05, 2026 @09:19AM (#50379374)
I personally have been increasingly in favor of eliminating operator precedence, even including associativity. It so rarely adds value and is so easy to misunderstand. The SmallTalk and APL models are at least consistent and operator agnostic, but they are unintuitive to read to inexperienced coders.

Heavy nesting of complex expressions is also not easy to comprehend immediately, but it's better than trying to unwind the precedence.

That said, maybe this approach is best; just take the small set of operators where we have all internalized the precedence and require it everywhere else.

Re:Partial Operator Precedence by unrented7977 on Thursday November 05, 2026 @03:06PM (#50383780)
After being gaslit by C's operator precedence for my entire career, I've learned to just ignore it and add parentheses around every pair of operands until my linter starts crying.
Re:Partial Operator Precedence by Tarq0n on Thursday November 05, 2026 @03:52PM (#50384319)
Nesting can be ameliorated with a pipe operator.