cm0002@lemmy.world to Programmer Humor@programming.dev · 3 days agoTell me the truth ...piefed.jeena.netimagemessage-square143fedilinkarrow-up11.16K
arrow-up11.16KimageTell me the truth ...piefed.jeena.netcm0002@lemmy.world to Programmer Humor@programming.dev · 3 days agomessage-square143fedilink
minus-squareethancedwards8@programming.devlinkfedilinkEnglisharrow-up7·2 days agoWhy is this a big mistake? I’m not a c++ person
minus-squarebitcrafter@programming.devlinkfedilinkarrow-up4·2 days 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-up3·2 days 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?