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

Re: Announcing Perl 7 Perl5 Porters <perl5-porters@perl.org>

Thread Previous | Thread Next
From:
=?UTF-8?Q?Salvador_Fandi=c3=b1o?=
Date:
June 30, 2020 10:02
Subject:
Re: Announcing Perl 7 Perl5 Porters <perl5-porters@perl.org>
Message ID:
b3c0dab4-2f93-c2b0-f0ab-91b0bbe83485@gmail.com
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?

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.

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