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:
demerphq
Date:
January 30, 2012 05:41
Subject:
Re: How we deprecate (was Re: Deprecating '\w {' in v5.16)
Message ID:
CANgJU+WDeHsOovaPt9-WSB7fuvKR1690-Qsu+W-OYUiePEQLHw@mail.gmail.com
On 30 January 2012 14:33, Rafael Garcia-Suarez <rgs@consttype.org> wrote:
> On 30 January 2012 14:22, demerphq <demerphq@gmail.com> wrote:
>>> IMO, depraction warnings belong in linters. "use warnings" isn't a linter.
>>> I think that, for those that have warnings enabled, the emitting of warnings
>>> on each and every run of the program will be considered as bad as a breakage.
>>
>> I just hope that people agree that it warning once per line using a
>> deprecated feature, and not once per invocation of that feature is the
>> lessor of two evils.
>
> I think most deprecation warnings are compile-time, so they'll warn
> once already.

Ah, so making ALL of them like that would not be a big change! And
would make their behavior consistent! So there really isn't much
ground to object to it. :-)

> This is not the case for at least :
> - "goto" to jump into a construct (runtime warning)
> - Use of *glob{FILEHANDLE} is deprecated (runtime warning)
> - chdir('') or chdir(undef) as chdir() (runtime warning, should be
> easy enough to move into a ck function)
> - Use of inherited AUTOLOAD for non-method %s::%s() is deprecated
> (runtime warning)

Well the one I specifically had in mind was the regex one for
unescaped curly-braces. Afaiui those would warn every time too.

And I bet people would appreciate if those warning stopped happening
so much. :-)

cheers,
Yves



-- 
perl -Mre=debug -e "/just|another|perl|hacker/"

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