Have you ever spent an hour expecting 2+2*2 to be 8 before you figured out that you're missing some parenthesis?
Turns out that almost two decades of programming experience did not prepare me for an equivalent problem with operator precedence in C. Never trust a human brain 😜
@dos I would expect 6.
@dos Is the "Do the multiplication and division" type rule not universal?
Librem Social is an opt-in public network. Messages are shared under Creative Commons BY-SA 4.0 license terms. Policy.
Stay safe. Please abide by our code of conduct.
@dos I always write out the parentheses as I expect them to be and then let linters remove them if unnecessary. Been doing that for 12 years now 😂