3 ms·
For reasons it’s never really bothered me, but the *other* loop bug does bite me some times. This is the one where the loop values are values. The common
by Joker_vD 3y ago
For reasons it’s never really bothered me, but the *other* loop bug does bite me some times. This is the one where the loop values are values.
The common mistakes wiki lists the capture bug twice, but doesn’t mention this bug.
Yeah, I guess you're right, the author didn't call it a bug...
- tapirl 3y agoI believe the author doesn't mean it is a bug in the general sense. The author just means it is a shortcoming, and this shortcoming is surely fixable. The author provides a solution, but I think the zig way is better: for _, *player := range players { player.score = 0 }
- lsaferite 3y agoIf they meant 'shortcoming', they would have used that word. They used the word 'bug' to describe the issue. Repeatedly.