4 ms·
But the point is that with ++, I don't have to look at all at the increment - I know what it is. The issue isn't how far away I have to look, it's that I have
by AnimalMuppet 11y ago
But the point is that with ++, I don't have to look at all at the increment - I know what it is. The issue isn't how far away I have to look, it's that I have to look at all. (Or I don't look, and just assume that it's an add-one because that's what it always is, and then wonder why my loop doesn't work right.)
- dragonwriter 11y ago> the point is that with ++, I don't have to look at all at the increment Of course you do, otherwise you wouldn't know it was an increment in the first place.
- AnimalMuppet 11y agoWell, all right, my brain has to parse one fewer symbols. ++ is the equivalent of parsing +=, but there's no "1" or "j" or anything else that I have to parse in addition. (No pun intended, but I also didn't edit it out...)
- throwaway999888 11y ago> (Or I don't look, and just assume that it's an add-one because that's what it always is, and then wonder why my loop doesn't work right.) How often do your loops depend on incrementing a variable by one? In _Swift_ code.