cm0002@lemmy.world to Programmer Humor@programming.dev · 8 months agoTell me the truth ...piefed.jeena.netimagemessage-square101linkfedilinkarrow-up1926arrow-down113
arrow-up1913arrow-down1imageTell me the truth ...piefed.jeena.netcm0002@lemmy.world to Programmer Humor@programming.dev · 8 months agomessage-square101linkfedilink
minus-squarebitcrafter@programming.devlinkfedilinkarrow-up5·8 months 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-up3arrow-down1·8 months agoCould you provide an example?
minus-squaretimhh@programming.devlinkfedilinkarrow-up1·8 months agoThe biggest problem is that each element doesn’t have a unique memory address; iterators aren’t just pointers.
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?
The biggest problem is that each element doesn’t have a unique memory address; iterators aren’t just pointers.