| ▲ | thaumasiotes 3 hours ago | |
> It's not like 'for' is limited to counting in other languages. The grand-daddy in c does something until some condition is false C 'for' is a while loop. It's strictly syntactic sugar for an already existing feature. And it's really, really transparent. `for(A; B; C) { do_stuff(); }` isn't just a while loop, it's this while loop:
Other languages have treated for as a separate concept from while. C isn't really informative in that case. | ||