3 ms·
I don't know why this got downvoted; true, I was referring to the infinite loop case, but this is a legit (if not C++-specific) case of a benefit of for over wh
by gumby 9y ago
I don't know why this got downvoted; true, I was referring to the infinite loop case, but this is a legit (if not C++-specific) case of a benefit of for over while.
Likewise do...while is in retrospect, a mistake, because it documents the control strategy in a bad place from a humans-understanding-code point of view.
- flavio81 9y ago>I don't know why this got downvoted; true, I was referring to the infinite loop case, but this is a legit (if not C++-specific) case of a benefit of for over while. Thanks gumby. I simply didn't catch that they were referring only to infinite loops. I though they were debating the usefulness of while versus for, in general.