Opportunity
Jonathan M Davis
jmdavisProg at gmx.com
Tue Apr 9 19:34:03 PDT 2013
On Tuesday, April 09, 2013 18:00:43 Nick Sabalausky wrote:
> On Tue, 09 Apr 2013 14:22:21 -0400
>
> "Jonathan M Davis" <jmdavisProg at gmx.com> wrote:
> > If it's something that has to be
> > fixed, it should be an error, and if it doesn't have to be fix, don't
> > warn about it, because any good programmer is going to have to fix
> > all of the warnings anyway, ultimately making it not much different
> > from an error anyway. Stuff like you're suggesting really should be
> > left up to lint-like tools.
>
> The way I see it, warnings *are* a lint tool. (Which is part of why I've
> always disliked -w and use -wi instead.)
Except that with a lint tool, you can ignore some of them and usually can
adjust what it outputs, possibly have suppression files, etc. Such tools are
far more flexible than simply turning all warnings on or turn them all off. And
with compiler warnings, you need to fix them all - even if they really don't
need to be fixed - or you risk missing the ones that _do_ matter among all the
ones that don't. It's bad practice for a project to have any warnings at all.
So, the situation with compiler warnings and lint tools is really quite
different, especially when the compiler has no flags to control warnings except
to turn them all on or off. I really wish that dmd had never had warnings in
the first place. I think that we would have been better off without them. This
is one area where I'm actually in full agreement with Walter.
- Jonathan M Davis
More information about the Digitalmars-d
mailing list