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

Is 5/7 Interoperability a Desirable Thing?

Thread Next
From:
James E Keenan
Date:
July 4, 2020 11:52
Subject:
Is 5/7 Interoperability a Desirable Thing?
Message ID:
8d535555-5416-6507-4164-516fa4bda2c5@pobox.com
[This message was sent in a different form to a small number of people 
to gain initial feedback.  I haven't gotten anything so far. :-(  Since 
discussion on the p5p list is moving on rapidly, I'm posting it here so 
that one other approach gets some airing.]

What would be so terrible if Perl 7 made no promises whatsoever about 
interoperability with Perl 5 syntax?

For the sake of argument, let's assume that these are our goals for Perl 7:

* Provide a platform for new application development in Perl that 
incorporates what we've come to consider best practices (at a minimum, 
'use strict' and 'use warnings' on by default).

* Establish the precedent that, over time (at least a 5-year period), 
Perl will conduct major version upgrades that incorporate what 
additionally comes to be considered best practices.

* As a consequence of the two preceding items, re-energize the Perl 
community, attracting new users (both among enterprises and individual) 
and core developers.

Given these goals, suppose this were our action plan:

* Perl 5 is officially declared to be in maintenance mode.  Unless we 
were to deem it expedient to release a perl-5.34 for social purposes, 
5.32 will get maintenance releases only.  The maintenance window will be 
five years unless further extended.

* All new feature development and all optimization of existing 
functionality will be done in Perl 7 only.  Once perl-7.0.0 is released 
-- and especially once the first production release thereafter 
(perl-7.2.0) is issued -- enterprises and individuals will be encouraged 
to develop all *new* applications in Perl 7.

* The set of enhancements to defaults in Perl 7 will be relatively 
minimal (perhaps as simple as strict-and-warnings-on-by-default).  We 
will seek the consultation of major enterprise users of Perl 5 to 
ascertain what goes into that set.  (We will request that the Perl 
Foundation organize such consultation, so that the burden is not on core 
developers who happen to be employees of those companies.)

* Perl 7 will have no 'use v5' or 'use v7' mode.  We will not offer 
users a way to switch back and forth between the two major versions' 
syntaxes.  If we emphasize that Perl 7 is the way *new* Perl should be 
written, there will be no need for that syntax switching.

* The Perl community will work with OS distributors to get Perl 7 
packages/ports out quickly and then to adapt their ecosystems to Perl 7 
tooling over the next five years.

* I haven't yet thought threw what happens with CPAN on this.

I think that we should sidestep attempts at interoperability and say, 
"Perl 5 will be well maintained, but Perl 7 is the way *going forward*."

What do you think?

Thank you very much.
Jim Keenan

__DATA__
The 'core-p7' branch in our github repository implements a vision in 
which interoperability between Perl 5 and Perl 7 is promised via 'use 
p5;' and 'use p7;'.  So that's a vision more ambitious than what i am 
proposing and perhaps more in line with Sawyer X's original proposal.

This branch was started by Nicolas Rochelmagne in February and rebased 
on blead on June 22.  Nico (@atoomic) largely converted the codebase to 
work with strict on by default.  I have been working on the core-p7 
branch since last Sunday, June 28, with the goals of fixing test 
failures and having tests run warnings-free.

The overwhelming majority of the code changes I've made have been to 
compensate for the fact that for decades we were averse to running the 
older parts of the test suite with strict and warnings enabled.  Hence, 
I infer that any enterprise which has paid attention to strict and 
warnings should have a relatively easy time converting their Perl 5 code 
to Perl 7 -- and they have at least five years to do so.

Further, since strict became default in 5.12, the burden of 5->7 
conversion will be even lighter if an enterprise or user has paid 
attention to warnings.  (I concede that this could be a problem.  In 
both places I worked between 2006 and 2016, running in production 
without turning warnings on was a test of one's technological machismo.)

Thank you very much.
Jim Keenan

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