Wish: Variable Not Used Warning

superdan super at dan.org
Wed Jul 9 14:25:41 PDT 2008


Steven Schveighoffer Wrote:

> "superdan" wrote
> > Steven Schveighoffer Wrote:
> >
> >> "Walter Bright" wrote
> >> > The reason for treating warnings as errors when warnings are enabled is 
> >> > so
> >> > that, for a long build, they don't scroll up and off your screen and go
> >> > unnoticed.
> >>
> >> I've been following this thread, and I'm not really sure which side of 
> >> the
> >> issue I'm on, but this, sir, is one of the worst explanations for a 
> >> feature.
> >> Ever heard of 'less'?  or 'more' on Windows?  Maybe piping to a file? 
> >> Maybe
> >> using an IDE that stores all the warnings/errors for you?
> >>
> >> Please stop saving poor Mr. ignorant programmer from himself.  Education 
> >> is
> >> the key to solving this problem, not catering to the ignorance.
> >>
> >> Sorry for the harshness, but seriously!
> >
> > in c++ this kind of argument that contains "it's an issue of education and 
> > shit" in it has been used for many years. after a lot of experience in the 
> > field nowadays everyone silently agrees that that argument is useless. 
> > folks on comp.lang.c++ start mocking you if u bring that argument up.
> >
> > i am 110% on walter's side on this shit. there should be no warnings and 
> > shit. only errors. it is not catering to the ignorant. it is a matter of a 
> > properly defined language.
> 
> I think you missed my point.  Walter's position on warnings being errors 
> (mind you, not by default, only when the -w (show me the warnings) switch is 
> applied) is that people run out of screen space.  To me, that's just plain 
> silly as an argument.  If you're gonna have warnings, which aren't 
> considered errors by default, at least have it possible to configure so the 
> compiler doesn't error out on the 1st warning.

yarp i also didn't exactly get high on walter's argument. 

> By education I mean, tell the ignorant programmer how to use his shell to 
> pipe the warnings into a paged format, or to a file, or whatever.  Don't 
> hinder the knowlegable programmers who want to have everything at once.

fair enough. by the way i'm of with that gun zealot (what's his name) that good shit should output exactly nothing on success.

> Regarding whether warnings should be in a lint tool or not, I'm undecided on 
> the issue, as I have been hit by both sides (too many useless warnings, or 
> gee it would have been nice for the compiler to tell me I did this wrong).

that's a good argument that there should be no two ways about it.

walter, make all warnings errors without -w and get rid of -w.



More information about the Digitalmars-d mailing list