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

Re: A troubling thought - smartmatch reïmagined

Thread Previous | Thread Next
From:
Branislav Zahradník
Date:
June 28, 2022 12:27
Subject:
Re: A troubling thought - smartmatch reïmagined
Message ID:
CAB=rbOmtfPv5nXyWMYg9x6JOyVEGV26qzH+5XLKr9CX=9d66Xg@mail.gmail.com
> Comments welcome - on blog or replied here.
>
>
Instead of inventing something "similar to other language but different ...
yet still with same limitation", what about challenge first?

Can you write all your examples (and more) using Type::Tiny based
constraint dispatch (current or reasonably improved)?
eg:
given ($foo) {
  when (My::Domain::Accepted) { ... }
  when (My::Domain::Rejected) { ... }
  ...
}

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