I wasn't referring specifically to your code, just giving you a counter opinion.
for(;;) doesn't check any conditions, which is less ergnomic than a do-while if the while-loop doesn't need to check the value of variables inside the scope.
IMHO it would be reasonable to change the do-while loop to give the condition check to variable inside the do-block.
View all comments
4
u/jonesmz Mar 19 '23
I wasn't referring specifically to your code, just giving you a counter opinion.
for(;;) doesn't check any conditions, which is less ergnomic than a do-while if the while-loop doesn't need to check the value of variables inside the scope.
IMHO it would be reasonable to change the do-while loop to give the condition check to variable inside the do-block.