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