kyub@discuss.tchncs.de to Programmer Humor@programming.devEnglish · edit-22 days agoThe infamous "if loop" actually existsdiscuss.tchncs.deimagemessage-square29fedilinkarrow-up1183arrow-down112file-text
arrow-up1171arrow-down1imageThe infamous "if loop" actually existsdiscuss.tchncs.dekyub@discuss.tchncs.de to Programmer Humor@programming.devEnglish · edit-22 days agomessage-square29fedilinkfile-text
minus-squarebrian@programming.devlinkfedilinkarrow-up4·7 hours agofound the following in our codebase the other day. while(booleanFlag) return; thhere wasn’t more in the loop body, that was it. the loop conditional does exist and it can hurt you.
minus-squareRikudou_Sage@lemmings.worldlinkfedilinkarrow-up1·3 hours agoCan it hurt you, though? My guess would be every sane compiler and interpreter optimizes this.
found the following in our codebase the other day.
while(booleanFlag) return;
thhere wasn’t more in the loop body, that was it. the loop conditional does exist and it can hurt you.
Can it hurt you, though? My guess would be every sane compiler and interpreter optimizes this.