Robert Dober
3/28/2006 8:55:00 AM
On 3/27/06, Wybo Dekker <wybo@servalys.nl> wrote:
>
> On Tue, 28 Mar 2006, Justin Collins wrote:
>
> > Wybo Dekker wrote:
> >> I would like to use the -w commandline option always, but any useful
> output
> >> is always obscured by message from the standard libraries:
> >>
> >> For example:
> >>
> >> [messages skipped]
> >>
> >> Should such messages not be banned?
> >>
> >
> > Some warnings are really just informational. For example, redefining a
> method
> > isn't 'wrong,' and it can be how your program is supposed to function.
> Or
> > having an uninitialized instance variable might not matter - after all,
> I
> > don't think there is a difference between that and setting it to nil.
> >
> > However, it could be dangerous or unintentional, so you get a warning.
> As
> > with all debugging output, you have to filter through it sometimes.
>
> Sure, that's all true, and I want to see such messages to warn myself for
> possibly bad programming habits.
> But when I see lots of such message emerge from libraries that I didn't
> write myself, I'll easily miss the ones that really matter to me and can
> be influenced by me.
>
> --
> Wybo
>
> Wouldn't it be nice to have a perl/ada style
pragma :warnings_on
pragma :warnings_off
or
pragma :warnings, level
at a dynamic base.
Now for a given (standard) library we could just say
e.g.
module MyModule
pragma :warnings 0
end
Just a thaught
Robert
--
Deux choses sont infinies : l'univers et la bêtise humaine ; en ce qui
concerne l'univers, je n'en ai pas acquis la certitude absolue.
- Albert Einstein