Unused variables and bugs
Brendan Zabarauskas via Digitalmars-d
digitalmars-d at puremagic.com
Sun Aug 24 02:55:31 PDT 2014
I use Rust a reasonable amount, and the 'unused variable',
'unused field' and 'unused item' family of lints help a great
deal in picking up mistakes early, especially when refactoring.
Don't ask me to cite specific examples though - because they are
enabled by default the issues are usually picked up and addressed
early.
Note that in order not to make the the lint more bearable,
underscore-prefixed identifiers are ignored and you can also
disable any lint can be disabled on an item-by-item basis using
an attribute (although in practice the latter option is rarely
used). I do think without those options it would be a massive
pain. The underscore thing might not be an option for D though -
do preceding underscores have a specific meaning in the
prevailing D coding style?
More information about the Digitalmars-d
mailing list