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

Re: Perl 7 - updates "perl5-porters@perl.org"<perl5-porters@perl.org>

Thread Previous | Thread Next
From:
=?UTF-8?Q?Salvador_Fandi=c3=b1o?=
Date:
July 5, 2020 09:33
Subject:
Re: Perl 7 - updates "perl5-porters@perl.org"<perl5-porters@perl.org>
Message ID:
729b8152-b45f-7c3d-18f0-e50004253ad5@gmail.com
On 4/7/20 1:25, Sawyer X wrote:

 >      You need to provide the version of Perl your code targets. This is
 > done with a "use V<version number>". The following version numbers are
 > supported:
 >      * "use v5": Perl 5 behavior - the previous version.
 >      * "use v7": Perl 7 behavior - the current version.
 >      * "use v8": Perl 8 behavior - the next version.

I see a couple of issues here:

1) If I understand the paragraph above correctly, it means that perl 8 
would refuse to run perl 5 code, right?

Keeping their code compatible with very old perl versions, is something 
several CPAN authors (myself included) take very seriously and that 
policy would force us to keep several versions of our modules in 
parallel or to use ugly tricks.

I don't have a crystal ball allowing me to know what Perl 8 or Perl 9 
will be, but I guess a large and fairly complete subset of the Perl 5 
language would still be there, in any of them. In my opinion, a 
best-effort policy where the interpreter tries to run perl 5 code anyway 
would be a better approach.

At the end, any new Perl version would have new features and removed 
features. New features could be deactivated with the "use v5" pragma. 
Features removed, would break some code, but not all of them. It would 
be a pity to axe all of it.

2) In any case, I think you need some kind of deprecation policy. If 
perl 7 is able to run all perl 5 code unchanged (or just with the "use 
v5" pragma added), almost everybody is going to leave his old code 
unchanged using perl 5 semantics. The day perl 8 comes out with support 
for several features removed, if would break half of CPAN and DarkPAN.

I know it may be extra work for the porters and not always feasible, but 
in my opinion features that are going to be eliminated, should generate 
warnings when its use is detected by the interpreter. Regarding a later 
mail by Kent Fredic about new warnings causing breakage, I see it, but 
still, I think it is an acceptable trade off.

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