Front page | perl.perl5.porters |
Postings from July 2020
Re: Announcing Perl 7
From: Paul "LeoNerd" Evans
July 3, 2020 17:47
Re: Announcing Perl 7
Message ID: email@example.com
On Fri, 3 Jul 2020 19:33:20 +0200
demerphq <firstname.lastname@example.org> wrote:
> So if I understand you both correctly, we have to continue to support
> all perl 5 code forever?
> Because that is what I understand you to be saying.
Then you misunderstand. That is not at all what I am arguing.
> To me this question comes down to a simple technical question: what
> language variant does the parser start out expecting before it sees
> the "use v7" line?
> If we say "perl 5" then we have to support all of perl 5 forever
> don't we?
> Doesn't that kind of er, stand in the way of not supporting perl 5
I'm saying that *right now* it should continue to behave like Perl 5,
but after a suitable announcement period it should start giving
"version is ambiguous" warnings. At some further point after that we
can have it be an outright error for there not to be a version
declaration, at which point we're free to cut off an older version of
perl if we so wish.
And by forcing everyone to have declared their version requirements by
then we can do a simple grep for "use v5" across all of CPAN to gain a
very easy simple metric on how much actual CPAN code is actually still
using v5. When we feel that number is small enough - or the remaining
outliers unimportant enough - we can cut it off.
> Doesn't it make a lot more sense to say "prior to seeing a C<use
> v$DIGIT;> statement the parser will be expecting the *latest* variant
> of the language"? Isn't the certainty of that the only sane choice if
> we are ever to deprecate older variant code?
No. I'd say it makes more sense to say "prior to seeing a C<use
v$DIGIT;> statement the parser will start off in ambiguous-guessing-5
variant, which provokes a warning when it starts to parse real code".
Isn't the certainty of knowing the author is now strongly encouraged to
declare their version requirement the only sane choice if we are ever
to deprecate older variant code while knowing it is safe to do so?
Paul "LeoNerd" Evans
email@example.com | https://metacpan.org/author/PEVANS
http://www.leonerd.org.uk/ | https://www.tindie.com/stores/leonerd/