Front page | perl.perl5.porters |
Postings from January 2017
Re: Deprecation plans
Thread Previous
|
Thread Next
From:
Sawyer X
Date:
January 15, 2017 10:52
Subject:
Re: Deprecation plans
Message ID:
882ac7f2-b26c-657d-963d-ff2a2f350040@gmail.com
On 01/14/2017 05:36 PM, Sawyer X wrote:
>
> On 01/11/2017 01:15 PM, Dave Mitchell wrote:
>> On Tue, Jan 10, 2017 at 12:05:39PM +0100, Ævar Arnfjörð Bjarmason wrote:
>>>> * $* is no longer supported: Functionality removed in 5.10.0, removing
>>>> the warning.
>>>>
>>>> * $# is no longer supported: Functionality removed in 5.10.0, removing
>>>> the warning.
>>> Shouldn't we be consistent here and either make all previously magical
>>> variables listed in perlvar either not special at all (as seems to be
>>> the plan with $* & $#), or reserve them forever by making their use
>>> fatal as is the plan with $[?
>>>
>>> My bias would be to just make them all fatal, despite all these old
>>> deprecation warnings someone will dig up an old script / blogpost /
>>> Matt's Script Archive entry and try to execute it, I think it would be
>>> more helpful to just die in those cases instead of introducing subtle
>>> behavior differences.
>> +1
> I reckon this was an oversight. I'm also in favor of making them all fatal.
Abigail clued me in on the oversight.
$* and $# have lost their "magic" characteristic back in 5.10. That is
why they fell off the radar and $[ was considered for a proper
deprecation and fatalization cycle.
On 5.16 $[ was changed so if you call "use v5.16" or "no feature
'array_base'" $[ simply has no effect, although you can still set it to
0. This means that it, unless you apply the previously mentioned pragma
calls, this variable still has usage, and this is why it *must* go
through a deprecation cycle and why we noted that. I think there's
probably little value in calling fatal on $* and $# since they have no
usage (in any form) from 5.10. However, for cleanliness sense, and to
allow us to communicate for certain that we don't accept it (and allow
us to possibly make a new use of them in the future), we might as well
fatalize them as well. I think a deprecation cycle of warning before
fatalizing would be better, in case anyone has them still in older
scripts that somehow passed an upgrade to 5.10 and above without
breaking. (I'm honestly not sure how likely that is, but we're not in a
rush anyway with them.)
Thread Previous
|
Thread Next