develooper Front page | perl.perl5.porters | Postings from April 2021

Re: on changing perl's behavior

Thread Previous | Thread Next
From:
Christian Walde
Date:
April 9, 2021 14:30
Subject:
Re: on changing perl's behavior
Message ID:
op.01k6laa4ydyjqt@xenbox.cihq
On Fri, 09 Apr 2021 15:51:02 +0200, Martijn Lievaart <m@rtij.nl> wrote:

> Op 09-04-2021 om 12:09 schreef Christian Walde:
>> On Fri, 09 Apr 2021 11:51:33 +0200, Ovid <curtis_ovid_poe@yahoo.com>
>> wrote:
>>
>>>    On Friday, 9 April 2021, 11:32:55 CEST, Christian Walde
>>> <walde.christian@gmail.com> wrote:
>>>
>>>> There's a way to make everyone happy.
>>>>
>>>> Define `use 7;` and up as: "doesn't provide format-related things".
>>>>
>>>> Define missing `use $v;` or one with $v < 7 as: "provides
>>>> format-related things as they were pre-7".
>>>>
>>>> That way we don't step on any toes of format users, and Leonerd can
>>>> create new syntax using format-danglies in v7+.
>>>
>>> I am not sure I understand. Are you suggesting that if you want the
>>> benefit of v7 and you want formats, you're out of luck? Or are you
>>> suggesting you have to learn more boilerplate by explicitly not using
>>> "v7" but writing the boilerplate to get the benefits of v7+formats?
>>> That isn't better than what we have, so I think I've misunderstood you.
>>
>> As long as Perl dialects $v < 7 are still implemented in the
>> interpreter you can do:
>>
>>    use 7;
>>
>>    sub do_format {
>>        use 5;
>>        format ...;
>>        write;
>>    }
>>
>> or
>>
>>    sub do_format {
>>        format ...;
>>        write;
>>    }
>>
>>    use 7;
>>
>>    do_format();
>
> Or simply
>
>     use 7;
>     use feature 'format';
>
>     sub do_format {
>         format ...;
>         write;
>     }
>
>> Only once it is decided that dialects $v < 7 be deprecated would those
>> stop to work.
>
> Which is decoupled if it is a feature.

Also nice, yes. :)

Or LeoNerd's work here. https://www.nntp.perl.org/group/perl.perl5.porters/2021/04/msg259769.html

Many ways to slice this carrot. :D

-- 
With regards,
Christian Walde

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