hey wait a minute.

>This is a real nuisance, because as observed, it makes
>for-loops non-modular. You can't portably copy/paste a for-loop
>within the same enclosing block.
>This means you have to go back to C conventions of
>putting the variable declaration at the beginning
>of the block, effectively.

that's not quite accurate.  consider the following, which makes the for loop
self-contained, and also happens to ENFORCE that the lifetime of "int i"
does not go past the for loop (which causes a separate problem, but the
problems are mutually exclusive).


{
for (int i; blah blah; blah blah)
    {
    blah blah
    }
}


just add the braces around it!  then copy-paste the outer braces as well.



Reply via email to