develooper Front page | perl.perl5.porters | Postings from November 2014

Re: [perl #122853] Guarantee 0-9, A-Z, a-z character classes

Thread Previous | Thread Next
From:
Karl Williamson
Date:
November 15, 2014 18:02
Subject:
Re: [perl #122853] Guarantee 0-9, A-Z, a-z character classes
Message ID:
54679526.20205@khwilliamson.com
On 11/14/2014 11:10 PM, Father Chrysostomos via RT wrote:
> On Thu Nov 13 21:29:51 2014, public@khwilliamson.com wrote:
>> If we as a project really thought that not warning for stupid things
>> is
>> the right thing for production code, we wouldn't compile perl itself
>> with -Wall, and even -Wextra.  No, we want all the warnings the
>> compiler
>> reasonably can give us, even if some of them are bogus.
>>
>> The discipline of software engineering is to try to get the best code
>> with the fewest bugs with the least effort.  The rule of thumb I was
>> taught was (and may still be) that an error detected at a given stage
>> in
>> a product life-cycle is an order of magnitude more expensive to fix
>> than
>> one found at the immediately prior stage.  As a developer with a long
>> todo list, I want the compiler to tell me that I'm doing something
>> iffy,
>> along with a way to suppress the warning if I decide to do it anyway,
>> perhaps because the compiler is wrong.  But the compiler should err
>> towards more, rather than less warning.
>
> This is where I disagree with you.  When you compile a C program, if there are a few harmless warnings, you can just ignore them.  With Perl, you get the same warnings every time you run the program.  So we ought to err on the side of caution and avoid false positives.  If there are too many nagging warnings, people will just turn warnings off.

This is a reasonable position that I had not considered.


Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About