Docs: Section on local variables

Andrej Mitrovic andrej.mitrovich at gmail.com
Wed Apr 25 09:10:44 PDT 2012


On 4/25/12, Stewart Gordon <smjg_1998 at yahoo.com> wrote:
> Even if it's left over from debugging, it
> looks silly, and
> might lead other people reading the code to believe something's wrong.

There's about a million ways to make code unreadable, and nobody
writes pitch-perfect code that has absolutely no leftover code or
comments.

And what if you're refactoring and you do multiple builds every couple
of seconds? You add a variable, remove it, etc etc. Enabling this
warning will just make for a noisy compiler. Keeping variables clean
is the responsibility of the programmer and not the compiler.

If it doesn't affect the semantics of code the compiler should shut
up. Please don't turn the compiler into a reincarnation of Clippy.


More information about the Digitalmars-d-learn mailing list