Re:I Hate the Letter F
by thaumasiotes on Saturday October 19, 2024 @03:26AM
(#41886251)
> and a convoluted while where you could write a “for”
What's convoluted about it? A `for` is about as simple as syntactic sugar gets.
for( a; b; c ) {
}
is exactly equivalent to
a;
while( b ) {
c;
}
(OK, a variable declared in `a` will remain in scope after the while loop terminates, but the only way for this to have an effect on anything is if you intentionally refer to it afterwards, in which case you needed to predeclare it for the for loop too.)
What's convoluted about it? A `for` is about as simple as syntactic sugar gets.
is exactly equivalent to (OK, a variable declared in `a` will remain in scope after the while loop terminates, but the only way for this to have an effect on anything is if you intentionally refer to it afterwards, in which case you needed to predeclare it for the for loop too.)