• lysdexic@programming.devOPM
      link
      fedilink
      English
      arrow-up
      0
      ·
      9 months ago

      Should focus on getting rid of undefined behavior.

      What problem do you believe is presented by undefined behavior?

      • mrkite@programming.dev
        link
        fedilink
        arrow-up
        2
        ·
        9 months ago

        It violates the principle of least surprise. You don’t expect the compiler to delete your bounds checking etc.

        The way c and c++ define and use UB is like finding an error at compile time and instead of reporting it, the compiler decides to exploit it.