bearophile <[email protected]> wrote:
but it can't avoid bugs like the following inc(), so I think it's not
enough to solve the problems I was talking about:
// Code #5
class Foo {
int x;
void inc(int x) { x += x; }
}
void main() {}
Oh, but it can (sort of). By allowing this syntax, there is *very* little reason to allow for shadowing of members by parameters or local variables, and those may thus more readily be disallowed. -- Simen
