develooper Front page | perl.perl5.porters | Postings from January 2012

Re: How we deprecate (was Re: Deprecating '\w {' in v5.16)

Thread Previous | Thread Next
From:
Abigail
Date:
January 30, 2012 02:20
Subject:
Re: How we deprecate (was Re: Deprecating '\w {' in v5.16)
Message ID:
20120130102010.GB31889@almanda
On Mon, Jan 30, 2012 at 07:51:41AM +0100, Steffen Mueller wrote:
> On 01/30/2012 03:21 AM, David Golden wrote:
>> Jesse's vision included the notion that changes should happen
>> lexically under in a declared version block, whenever possible.  So in
>> this case, perhaps the deprecation warning should only occur under
>> "use v5.16"?  Frankly, I think the lexical version declarations are
>> going to be horribly confusing and I question whether that's the right
>> path forward or whether a simpler policy change would be more
>> user-friendly.
>
> It seems to me like deprecation warnings should be lexical in a "use  
> 5.future" enabled block IF the deprecated feature is only removed in  
> "explicit 5.future enabled" code and continues to be supported  
> indefinitely in older versions (whether explicit or implicit).  
> Otherwise, we may as well remove the deprecated feature (after  
> deprecation) entirely as barely anybody can tolerate deprecation 
> warnings.


Right. But if it's going to be removed only with some feature enabled,
a new meaning will also only occur with said feature enabled.

Which means that if a subroutine is documented as "takes a pattern as
first argument", I would not be able to pass it '\w{foo}', as its meaning
will be different depending on whether the sub uses the pattern with
said feature enabled or without.

Which seems like a bad idea to me.



Abigail

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