for (int i = 0; i < 10; i++) { Foo(); } int i = 10; // error, \'i\' already exists ---------------------------------------- for (int i = 0; i < 10; i
Or is just a case of nanny-state compilerism?
Exactly that. There is no sense in "reusing" variable names in the same method. It's just a source of errors and nothing more.