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

Re: Announcing Perl 7 Perl5 Porters <>

Thread Previous | Thread Next
Paul "LeoNerd" Evans
July 3, 2020 17:38
Re: Announcing Perl 7 Perl5 Porters <>
Message ID:
On Fri, 3 Jul 2020 19:22:03 +0200
demerphq <> wrote:

> We want to eventually ditch the perl 5 variant, and move to a saner
> perl 7 or 8 variant, which means that ast some point we want the
> parser to not know about 5 AT ALL, except when it throws exceptions.
> Making the rule be "the parser starts out expecting perl 5" simply
> does not make sense, for *any* version. Making the rule be "the parser
> starts out expecting perl $Latest" does.

Right now, we start off in "version 5" mode until we see a
"use VERSION" which alters the idea. We should *strongly encourage*
everyone to be explicit with their version statements. It is a shame
more people haven't been using "use VERSION" so far, though that can be
explained by the fact it isn't very powerful yet. Suggestions have been
made that it should "use warnings" and so on - these could definitely

How about this as an idea:

At some point in the future, the semantics changes very slightly to:
We start off in "guess probably version 5" mode, wherein any
non-whitespace/comment syntax we see other than an explicit "use
VERSION" statement provides a warning that the user didn't declare
their version requirement. We'll continue presuming v5 for now unless
they asked for something else, but that warning gives people a hint, a
nudge that they should be explicit now.

At some later point beyond that, it becomes a hard error. We can now
delete all the old version-5 compat code in the core because we know
(from the previous deprecation round and warnings) that everyone has
been explicit on their version requirements.

Plus now, since we know everyone is being explicit in their version
requirements, we can continue to do the same trick further down the
line; maybe at a hypothetical version 15 a few decades from now people
have to start dropping version 7. That's all still fine, because
everyone declared the version they wanted.

This isn't a new idea, various folks have already suggested it already:

  Dave Mitchell -

  BooK -

  Darren Duncan -

  with whom myself and Christian Walde agree -

Paul "LeoNerd" Evans      |  |

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