News for hackers. Stuff that matters.
Re:Partial Operator Precedence by fc417fc802 on Tuesday November 10, 2026 @02:39PM (#50445229)
Personally I don't see that as a flaw. My concern is how easy a set of rules is to understand versus get wrong at a glance. I think strict left to right is one of the better options owing to how hard it is to inadvertently misread the meaning of an expression.

> for ?:, only the part between the ? and the : is implicitly paranthesized.

That is a choice. If you treat it as an operator, yes. But you don't have to. It can be treated as a language construct. Given the grammar expr ? expr : expr the training portion is akin to a set of brackets or parenthesis, greedily consuming all until end of line.

There are no comments on this comment yet.