develooper Front page | perl.perl5.porters | Postings from June 2022

Re: disabling smartmatch and when()?

Thread Previous | Thread Next
Darren Duncan
June 20, 2022 19:14
Re: disabling smartmatch and when()?
Message ID:
On 2022-06-20 11:44 a.m., Darren Duncan wrote:
> It seems to me that the low hanging fruit is to make Perl 5.38 issue very 
> explicit "deprecation" warnings for any code using smartmatch/etc, instead of 
> saying "experimental".

Actually, would it be considered a breaking or inappropriate change to do this 
in a Perl 5.36.1 release?

One could argue that updating the text of the "experimental" warning for 
smartmatch/etc to more explicitly say that the feature is "deprecated" instead, 
that this should not be a breaking change, and it would be very beneficial by 
getting that messaging in front of users a lot sooner.

Anyone updating to 5.36 anyway would likely keep up with patch versions, 
including packagers for Linux distros and such.

The poor user text is effectively a bug that would be reasonable to fix early.

Likewise, patch releases for any other still supported Perl releases could have 
that updated user text.  But at least for 5.36 since it just came out.

Note that my proposal here isn't meant to be a rationale for a much bigger 
change to happen in 5.38, such as the compile time error proposal for 
smartmatch/etc, but that the user text update in all supported branches in 
addition to 5.38 would help get it seen by more people and sooner.

Would that work?

-- Darren Duncan

Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About