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

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

Thread Previous | Thread Next
From:
demerphq
Date:
July 3, 2020 18:14
Subject:
Re: Announcing Perl 7 Perl5 Porters <perl5-porters@perl.org>
Message ID:
CANgJU+VC_1YzATBmDGFgCpHpP_W9UDLHyVL0DCEv-0RinwyoKg@mail.gmail.com
On Fri, 3 Jul 2020 at 19:38, Paul "LeoNerd" Evans
<leonerd@leonerd.org.uk> wrote:
>
> On Fri, 3 Jul 2020 19:22:03 +0200
> demerphq <demerphq@gmail.com> 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
> help.
>
>
> 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.

I personally prefer the plan SawyerX has proposed, but I can live with
yours too.

cheers,
Yves


-- 
perl -Mre=debug -e "/just|another|perl|hacker/"

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