Front page | perl.perl5.porters |
Postings from July 2020
Re: Announcing Perl 7
July 3, 2020 18:20
Re: Announcing Perl 7
Message ID: CANgJU+WrFAmn8e1rkAWDe9pP0tqiLN2=RqPRA_F1MroNLcxbgw@mail.gmail.com
On Fri, 3 Jul 2020 at 19:47, Paul "LeoNerd" Evans
> On Fri, 3 Jul 2020 19:33:20 +0200
> demerphq <email@example.com> 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
> > forever?
> 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?
I dunno man, you seem to be just cheating the point here. How is
"ambiguous-guessing-5" mode compatible with us being on version 28 and
5 being dead for 8 years?
What you are actually saying is that "for now we will be in perl 5
mode, and some time in the future we will start out in "seek a use
v$digit; statement mode, anything else will be an error".
I don't like that.
I want this:
to not be an error. I don't want to have to write:
I mean, what will this do to eval statements? Does every eval TEXT
have to be prefixed with a 'use v7' or whatever?
perl -Mre=debug -e "/just|another|perl|hacker/"