develooper Front page | perl.perl5.porters | Postings from December 2007

Re: 5.11 (or 12) and strict

Thread Previous | Thread Next
From:
=?ISO-8859-1?Q?S=E9bastien_Aperghis-Tramoni?=
Date:
December 27, 2007 08:30
Subject:
Re: 5.11 (or 12) and strict
Message ID:
E2EC26A1-749C-44DC-BB90-3C2F1D88C517@free.fr
Michael G Schwern wrote:

> Sean O'Rourke wrote:
>> Steffen Mueller <l2ot9pa02@sneakemail.com> writes:
>>> If you write enough code to make importing optional features
>>> worthwhile, odds are very high you'd be importing "strict"
>>> anyway.
>>
>> I'm not a p5p regular or a Perl core developer, so you definitely
>> can, probably will, and possibly should ignore me.
>>
>> That being said, the above quote basically says "if you want to
>> use some desirable feature (like given/when) that is in Perl >
>> 5.10, you must accept this other feature (strictures) P5P deems
>> healthy," which seems strangely authoritarian.
>
> That's how "use 5.XXX" works with regard to feature.  You get  
> everything or
> nothing.  Somebody has to decide what "everything" is.  Besides,  
> this is more
> making the defaults fall in line with existing good practice than  
> dictating.


Exactly. I think that most if not all the modules and programs we  
maintain begin with "use strict;".
On the CPAN, the only modules that I maintain which lacks "use  
strict" is XSLoader because it's supposed to be an as light as  
possible interface to DynaLoader.

Besides, "use strict" still allows awful constructs. Take a look at  
the code I pasted in [1]. It has "use strict" at the top of the file,  
yet the part I pasted looks more like line noise or INTERCAL than Perl.

So something that would be more interesting is making strict.pm  
stricter, but there are backward compatibility issues: adding new  
domains by default will probably break existing code, and current  
strict.pm dies on unknown tags.

[1] http://use.perl.org/~Maddingue/journal/34424

-- 
S├ębastien Aperghis-Tramoni

Close the world, txEn eht nepO.


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