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

Re: disabling smartmatch and when()?

Thread Previous | Thread Next
From:
Sam Kington
Date:
June 20, 2022 20:11
Subject:
Re: disabling smartmatch and when()?
Message ID:
1E7073D9-673C-4674-BE98-890E37FAC801@illuminated.co.uk
On 20 Jun 2022, at 19:23, Dan Book <grinnz@gmail.com> wrote:
[…]
> We have no business removing smartmatch functionality without either a feature flag or an extremely long deprecation period *and* replacement functionality (and the proposed match feature is only one half of the required replacement, the other being "in" as LeoNerd has also proposed).

The plural of anecdote is not data, but my previous place had a hefty amount of code that used smartmatch purely so it could say if ($variable ~~ [qw(any number of possible values)]) . Having a convenient replacement for that syntax would make a lot of concerns about “if we upgrade our Perl we need to change our code” go away.

Sam
-- 
Website: http://www.illuminated.co.uk/


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