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

Re: smartmatch and v5.36.0

Thread Previous | Thread Next
Paul "LeoNerd" Evans
June 20, 2021 11:47
Re: smartmatch and v5.36.0
Message ID:
On Sat, 19 Jun 2021 21:27:46 -0400
"Ricardo Signes" <> wrote:

> Porters,
> I propose that we remove "switch" from the 5.35 and 5.36 feature
> bundle.  I have a draft MR <>
> that does most or possibly all of the work.
> What prevents this from going forward, apart from some testing?

I think we all want shot of that thing, and I expect I won't be the
first to throw a party when it goes. But I'm not sure we want to remove
it until we have a better replacement, do we?

I have been experimenting with Syntax::Keyword::Match:

  my $n = ...;
  match($n : ==) {
     case(1) { say "It's one" }
     case(2) { say "It's two" }
     case(3) { say "It's three" }
     default { say "It's something else" }

but I'm not sure it's ready to go into core yet - still more features
and dogfooding to be done yet.

Paul "LeoNerd" Evans      |  |

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