Front page | perl.perl5.porters |
Postings from January 2017
Re: Deprecation plans
Thread Previous
|
Thread Next
From:
Ævar Arnfjörð Bjarmason
Date:
January 11, 2017 10:42
Subject:
Re: Deprecation plans
Message ID:
CACBZZX5gn2gwt7r__seMP4m_BhYZNgR5vanYjcR7aLi0OXDZ-g@mail.gmail.com
On Wed, Jan 11, 2017 at 7:06 AM, Father Chrysostomos <sprout@cpan.org> wrote:
> Sawyer X wrote:
>> * Constants from lexical variables potentially modified elsewhere are
>> deprecated: Delete in 5.32.
>
> This is an instance where buggy behaviour is grandfathered in, to ease
> a bug-fixing transition. I assume 'delete' means delete the special
> case in the code that retains the bug, and switch over to making a non-
> constant routine (the correct behaviour).
We've gone from:
* Always creating const routines on *$k = sub () { $v }
* Only creating const routines on *$k = sub () { $v } if $v is
referenced once before, otherwise non-constant
Do you mean we should only create them on *$k = sub () :const { $v }?
That sounds fine, but shouldn't we also retain & expand the warning to
the second of the two cases above to alert users that that pattern no
longer creates constants?
Thread Previous
|
Thread Next