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

Re: Announcing Perl 7 Perl5 Porters <>

Thread Previous | Thread Next
Christian Walde
July 3, 2020 17:34
Re: Announcing Perl 7 Perl5 Porters <>
Message ID:
On Fri, 03 Jul 2020 19:22:03 +0200, demerphq <> wrote:

> On Tue, 30 Jun 2020 at 13:37, Paul "LeoNerd" Evans
> <> wrote:
>> On Tue, 30 Jun 2020 12:02:10 +0200
>> Salvador Fandiño <> wrote:
>> > It you want to avoid the "use v7;" line, then you should be able to
>> > tell perl explicitly in some way you want the 7 semantics. The only
>> > sane way I can see for that, is using different file terminations.
>> > I.e. p7, pl7, pm7, t7.
>> >
>> > And when perl 8 comes out, you can switch to p8, pl8, etc.
>> This would be an odd suggestion.
>> I believe the main motivation for people saying they don't want to
>> "use v7" is precisely to avoid having to update to "use v8" and so on
>> in the future; having to chase the latest-and-greatest by making a
>> single character change to their code every decade or so.
> Personally I do not see that or pleasing those people as the reason
> for doing it.
> I see it as simply providing a new answer to what version perl is
> expecting when it starts parsing. Eg, all the stuff "above" the use
> statement.
> As long as the rule is "perl 5" variant, we have a problem that anyone
> create a document that is a mix of a 5 and something else.
> 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.
> The people that use this to get the latest version are just making
> their lives difficult. Nobody sane should do it on purpose.

That circles back to the question of what you envision to happen in the future with unversioned perl 5 code. (Language fork, empower modules@, frankenstein via, etc..)

It also is completely orthogonal to the question of use 7; being mandatory or not. (You can still have it parse it as perl 7, and fail with ETOOVAGUE at a lack of version at end of parse or before any other parse error is thrown.)

With regards,
Christian Walde

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