while loop requires explicit condition, for loop doesn't, why?
c++, loops, syntax
Solution
Presumably, it's a side-effect of the fact that each given clause within the for-statement is optional. There's reasons why some for-loops wouldn't need an assignment; there's reasons why some others wouldn't need a condition; there's reasons why still others wouldn't need an increment. Requiring there to be some minimum number of them would be needlessly-added complexity.
Problem
In C++ you are allowed to have an empty condition inside the for-loop, for example as in `for (;;)` or `for (int x = 0;; ++x)`. But you can't do `while ()`. When condition is omitted inside the for loop, condition is assumed to be `true` (so the loop loops forever). Why isn't this the case with `while` loops, that is, what's the argument behind not letting `while ()` be an alias of `while (true)`?