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

Re: disabling smartmatch and when()?

Thread Previous | Thread Next
Darren Duncan
June 20, 2022 18:44
Re: disabling smartmatch and when()?
Message ID:
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".

Also the documentation can be updated at the same time which suggests 
alternatives for each of the smartmatch/etc use cases that already work now. 
Some of these may be more verbose while other common ones may not be.  Worst 
case scenario, they can always be replaced with if/else chains or such.

A more concise and well designed replacement for smartmatch/etc may be coming 
later, but in the meantime people can still be much more strongly and explicitly 
encouraged to not use the deprecated smartmatch/etc.

Then the tendency of the existing or new codebases to use smartmatch/etc would 
have a tendency to shrink rather than grow, especially in CPAN modules, which 
would be a positive development regardless of any other developments such as a 
replacement being made.

-- Darren Duncan

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