lysdexic@programming.devM to C++@programming.devEnglish · 1 year agoC++ Should Be C++www.open-std.orgexternal-linkmessage-square6fedilinkarrow-up10arrow-down10
arrow-up10arrow-down1external-linkC++ Should Be C++www.open-std.orglysdexic@programming.devM to C++@programming.devEnglish · 1 year agomessage-square6fedilink
minus-squaremrkite@programming.devlinkfedilinkarrow-up0·1 year agoShould focus on getting rid of undefined behavior.
minus-squarelysdexic@programming.devOPMlinkfedilinkEnglisharrow-up0·1 year ago Should focus on getting rid of undefined behavior. What problem do you believe is presented by undefined behavior?
minus-squaremrkite@programming.devlinkfedilinkarrow-up1·1 year agoIt 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.
Should focus on getting rid of undefined behavior.
What problem do you believe is presented by undefined behavior?
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.