On Thu, Sep 07, 2000 at 11:13:10PM -0400, Chaim Frenkel wrote:
> >>>>> "MGS" == Michael G Schwern <[EMAIL PROTECTED]> writes:
> MGS>     no warnings 'uninitialized';
> 
> I'm thinking of a switch, which is there external to the text of the
> script.

    -M-warnings=uninitialized

I didn't say it was pretty.  I don't know how useful it would be to
have 'tiers' of warnings.  -w0, -w10, etc... seems like no matter how
we layer them, somebody isn't going to like our choices.

I am leaning in favor to an "all or nothing" approach to warnings.
Turn em on or turn em off.  You want anything finer grained, you play
with the warning module.  Why?  Right now you can ask someone "does it
have any warnings?" and they say yes or no.  Very boolean.  It works
or it doesn't.  If you start putting in easy tiers you'll get users
convincing themselves that their programs work because it doesn't
issue any warnings under level 5 (or whatever).  "I have warnings on
and didn't get any, so I guess everything's ok" is a very easy
attitude to get into.

Kind of a shame-based method of keeping code clean.


> MGS> Everyone will have their own pet-peeve category of warnings, but I
> MGS> think keepking uninitialized value warnings off by default will make
> MGS> many people happy.
> 
> Actually, that's the one that I like the most. I'm usually marshalling
> large quantities of data, and I like to know (or at least be able
> to backtrack) when some piece of data was missing.

I personally just leave -w on and have gotten used to it, but it does
seem that if one warning people find most annoying its uninitialized
value warnings.  Not that this is a popularity contest.  It also
happens to be the most common warning, which is probably a good reason
to keep it on.


-- 

Michael G Schwern      http://www.pobox.com/~schwern/      [EMAIL PROTECTED]
Just Another Stupid Consultant                      Perl6 Kwalitee Ashuranse
MORONS!

Reply via email to