• lysdexic@programming.devOPM
      link
      fedilink
      English
      arrow-up
      0
      ·
      1 year 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
        1
        ·
        1 year 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.