cm0002@lemmy.world to Programmer Humor@programming.dev · 1 day agoTell me the truth ...piefed.jeena.netimagemessage-square111linkfedilinkarrow-up11.03Karrow-down115
arrow-up11.01Karrow-down1imageTell me the truth ...piefed.jeena.netcm0002@lemmy.world to Programmer Humor@programming.dev · 1 day agomessage-square111linkfedilink
minus-squareethancedwards8@programming.devlinkfedilinkEnglisharrow-up6·4 hours agoWhy is this a big mistake? I’m not a c++ person
minus-squarebitcrafter@programming.devlinkfedilinkarrow-up3·4 hours agoThe mistake was that they created a type that behaves like an array in every case except for bool, for which they created a special magical version that behaves just subtly different enough that it can break things in confusing ways.
minus-squareethancedwards8@programming.devlinkfedilinkEnglisharrow-up2arrow-down1·3 hours agoCould you provide an example?
Why is this a big mistake? I’m not a c++ person
The mistake was that they created a type that behaves like an array in every case except for
bool
, for which they created a special magical version that behaves just subtly different enough that it can break things in confusing ways.Could you provide an example?