develooper Front page | perl.perl5.porters | Postings from June 2020

Re: Announcing Perl 7

Thread Previous | Thread Next
From:
Darren Duncan
Date:
June 30, 2020 23:16
Subject:
Re: Announcing Perl 7
Message ID:
78d04912-f71c-228d-9acb-30a3ec6cdc00@darrenduncan.net
On 2020-06-30 3:02 a.m., Salvador FandiƱo wrote:
> On 30/6/20 6:40, Darren Duncan wrote:
>> Having taken more time to think about this, and seeing more discussion, I have 
>> come around further towards supporting a key aspect of Sawyer's proposal.
>>
>> 1. I no longer believe that a v7+ Perl interpreter should consider it 
>> mandatory for each Perl file to start with a "use <version>;" and instead I 
>> take the position that using such declarations should just be strongly 
>> encouraged, particularly for any Perl code meant to be shared with others.
> 
> But the thing is, some newbie writes a script in the all new perl 7 and doesn't 
> start it with the "use v7;" line. It works, everything is fine.
> 
> A couple of years into the future, a new release of Perl with some incompatible 
> changes is ready, perl 8. You follow the same logic: "use v8;" is not mandatory, 
> new features are enabled by default and so, a good bunch of perl 7 scripts and 
> modules become broken, and people is forced to change then adding a "use 
> compact::perl7" line?

I strongly disagree with "compat::perl7"; what they should be doing then is 
adding "use v7;" which is the exact same thing they could have added before but 
didn't, and that would still work on Perl 7.

> It doesn't makes sense to me.
> 
> It you want to avoid the "use v7;" line, then you should be able to tell perl 
> explicitly in some way you want the 7 semantics. The only sane way I can see for 
> that, is using different file terminations. I.e. p7, pl7, pm7, t7.
> 
> And when perl 8 comes out, you can switch to p8, pl8, etc.

I typically consider that adding new version-specific filename extensions is a 
horrible idea.  I hated the .pl6/.p6 extensions (.raku was so much better) and I 
hate the idea of pl7 etc.  Stick to .pl/.pm and recognize versions by the 
contents of the files.

-- Darren Duncan

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