scoping and hiding ------------------ Maybe we should make each each statement a subscope of previous statements. This allows hiding of identifiers if they are repeated, which is IMO useful, but it should probably only be allowed if it doesn't change the meaning of the code and doesn't create useless identifiers. For example: int a = 5; // useless => NOT OK int a = 3; int a = 0; while (a < 10) work(); int a = 3; // OK while (a < 10) work(); int a = 0; while (a < 10) work(); float a; // NOT OK while (a < 10) work(); The same rules should IMO apply for nested scopes inside functions: () f(bool b) { int i; double d = 1; if (b) { int i; // NOT OK, definition of outer i was useless up to the "if" // (should have been done after the "if") int j; int d; // NOT OK: changes meaning of code! // Variables are used i = j = 0; g(i, j); } int j = 1; // OK // Variables are used g(i, j); }