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

Re: Announcing Perl 7

Thread Previous | Thread Next
Darren Duncan
June 29, 2020 01:05
Re: Announcing Perl 7
Message ID:
I feel the best all-around solution here is for the Perl interpreter as of 
version 7.0.0 to make it mandatory to have the "use N;" (where N is a version 
number) tiny boilerplate at the top of each Perl file it runs.

This boilerplate has the same meaning it always had but it is now mandatory 
rather than optional.

This simple solution is a have our cake and eat it too thing.

By forcing a declaration, authors explicitly say what baseline behavior that 
they expect, and that can either be 5 or 7, but they say it explicitly.

Then the discussion is no longer the contentious what do you get when no version 
is specified, but rather what reasonable action does the Perl 7+ interpreter 
take when encountering a particular version declaration.  Most of the discussion 
here then is that the default behavior of Perl interpreter 7 is what happens 
when "use 7" is in a file.

Perl 5 code with appropriate "use 5" will continue to behave as it did before 
under a Perl 5 interpreter, and the Perl 7 interpreter will also permit it to 
run, and know what is expected.

The Perl 7+ interpreters can still remove older features so that certain Perl 5 
code will no longer run, but in that case they can separately give the error 
that eg 5.6 behavior is not supported, and the error can be customized based on 
the file's declared version that indicated what the author expected.

where I previously talked about this at greater length.  I'm saying this again 
as I feel my prior message may not have been seen in the haystack or because I 
wasn't subscribed to the list then but now I am.

If we simply get away from the idea that Perl is best without any version 
declaration at all, the better off we'll be.

-- Darren Duncan

Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About