• mindbleach@sh.itjust.works
    link
    fedilink
    arrow-up
    106
    ·
    10 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
      link
      fedilink
      arrow-up
      7
      ·
      10 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.

    • Crozekiel@lemmy.zip
      link
      fedilink
      arrow-up
      2
      ·
      10 months ago

      This is the way. It’s an intentionally ambiguously written problem to cause this issue depending on how and where you learned order of operations to cause a fight.