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

Re: disabling smartmatch and when()?

Thread Previous | Thread Next
Sam Kington
June 20, 2022 20:11
Re: disabling smartmatch and when()?
Message ID:
On 20 Jun 2022, at 19:23, Dan Book <> 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.


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