Context sensitivity

Timon Gehr timon.gehr at gmx.ch
Thu May 19 10:28:20 PDT 2011


> 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


More information about the Digitalmars-d mailing list