420
submitted 11 months ago by Toes@ani.social to c/196@lemmy.blahaj.zone
you are viewing a single comment's thread
view the rest of the comments
[-] mindbleach@sh.itjust.works 112 points 11 months ago

Different compilers have robbed me of all trust in order-of-operations. If there's any possibility of ambiguity - it's going in parentheses. If something's fucky and I can't tell where, well, better parenthesize my equations, just in case.

[-] linuxdweeb@lemm.ee 9 points 11 months ago

This is best practice since there is no standard order of operations across languages. It's an easy place for bugs to sneak in, and it takes a non-insignificant amount of time to debug.

[-] SmartmanApps@programming.dev 2 points 8 months ago

there is no standard order of operations across languages

Yes there is. The rules of Maths are universal.

It’s an easy place for bugs to sneak in

But that's because of programmers not checking the rules of Maths first.

load more comments (19 replies)
this post was submitted on 03 Dec 2023
420 points (100.0% liked)

196

16501 readers
2241 users here now

Be sure to follow the rule before you head out.

Rule: You must post before you leave.

^other^ ^rules^

founded 1 year ago
MODERATORS