develooper Front page | perl.perl5.porters | Postings from November 2017

Re: Revisiting smart match

Thread Previous | Thread Next
From:
Father Chrysostomos
Date:
November 29, 2017 04:28
Subject:
Re: Revisiting smart match
Message ID:
20171129042742.7180.qmail@lists-nntp.develooper.com
Ricardo Signes wrote:
> * Eirik Berg Hanssen <Eirik-Berg.Hanssen allverden.no> [2017-11-27T13:38:36]
> >   This voice from the peanut gallery would like to know if the two
> > different constructs could use two different keywords, or if that
> > particular shade has been ruled out for this bikeshed?
> 
>   given ($x) {                         
>     when   ($matcher) { ... }
>     ifcase ($_ > 100) { ... }
>   }
> 
>   do_stuff when $matcher;
>   do_stuff if   $time eq 'fleeting';

    given ($x) {
        .($matcher) { ... }
        =($_ > 100) { ... }
    }

:(...) is also available, but looks sad.

Quack.

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