> Bruno Medeiros: > > > I wasn't saying code conventions are good enough for all kinds of human > > errors, I was just talking about this particular one, of confusing and > > overlapping variable and type names. > > I think in this case some compiler strictness is better than code conventions. Few days ago I have opened an issue, to avoid this topic to be lost and forgotten: > http://d.puremagic.com/issues/show_bug.cgi?id=6005 > > Bye, > bearophile
I think it would be ok to disallow that statically. But it is important how to do it. Disallowing shadowing a name after it has already been referenced would be the best possibility I think. It might slightly compromise compiler efficiency though, because that is additional information that needs to be stored in the symbol table. Timon