4 ms·
I don't see how 'continue' would be confusing, it would stop the current calculation and start the next one, same as with normal loops. The behaviour of 'break
by contravariant 11y ago
I don't see how 'continue' would be confusing, it would stop the current calculation and start the next one, same as with normal loops.
The behaviour of 'break' might be confusing but then that's always the case in nested loops, no matter how you notate them.
- wasyl 11y agoI would argue that `break` intuitively makes you go back an indent, so if you don't indent after the first `for`, one can assume `break` just exits both loops (goes back from lvl 1 to lvl 0 indent)
- jimrandomh 11y agoThis doesn't quite work, since break skips over if statements (and most breaks have at least one if statement around them). So you have to look glance at the keyword at the elbow of each indent anyways, to know where it's going.