Wish: Variable Not Used Warning
Markus Koskimies
markus at reaaliaika.net
Thu Jul 10 20:58:53 PDT 2008
On Thu, 10 Jul 2008 20:28:53 -0400, Nick Sabalausky wrote:
> I suppose I should point out that I have nothing against treating
> warnings as errors, per se. I just think it should be optional and not
> forced by the compiler to be either "always treated as errors and
> there's nothing you can do about it" or "never treated as errors and
> there's nothing you can do about it"
Honestly,
(1) I was using D compiler happily for some years and I thought that it
generates warnings just like other compilers do. I was shocked to
recognize, that it really does not do that.
(2) I realized that there is some kind of fundamentalist ideology not to
produce warnings from compiler (that's extremely silly from my point of
view); that's why I suggested, that combining the current D possibilities
it would really make no big difference to treat warnings as errors (since
it seems, that it is more likely to get errors to the compiler, not
warnings),
(3) From the point of both programmer, and compiler designer, I see
absolutely no point not generating warnings, when the compiler knows it
has done something probably silly. The more optimizations the compiler
does, the more aware it is about the source code. What v*#p%&"/(¤ %&#s¤/&/
# %¤yh&/&/"&/&# %&/#¤ (*) is the sole reason not to show the analysis
compiler has already made (about unused vars, private methods, dead code,
unused imports etc. etc).
---
(*) Those are Finnish swearing words, that does not compile to English.
You may use "f**k" for every character ;)
More information about the Digitalmars-d
mailing list