Detector for unused variables

bearophile bearophileHUGS at lycos.com
Wed Aug 1 03:38:46 PDT 2012


Regan Heath:

> Indeed.  IIRC Walter's rationale on things like this has always 
> been that they belong in 3rd party tools.

Walter is not always right.


> It's why the DMD front end is available for use, so people can 
> create tools like this, syntax highlighters, re-formatters, 
> dependency tree diagrams, or... you name it.

Detecting unused variables is a core feature, it belongs in the 
compiler, like compile-time array bound tests and other errors 
currently detected by DMD. This allows everyone to use it with 
minimum work, so everyone enjoys it, and it requires less work to 
be implemented because the compiler already does lot of analysis.

Bye,
bearophile


More information about the Digitalmars-d-learn mailing list