develooper Front page | perl.perl5.porters | Postings from August 2012

Re: fixing smartmatch just hard enough (and when, too)

Thread Previous | Thread Next
From:
Klaus
Date:
August 27, 2012 02:16
Subject:
Re: fixing smartmatch just hard enough (and when, too)
Message ID:
6f47b10d-4f7c-4b1c-826f-3091a0e6a582@h5g2000yqh.googlegroups.com
On 26 août, 21:52, spr...@cpan.org (Father Chrysostomos) wrote:
> Ricardo Signes wrote:
> The three advantages to smart match I’ve seen are:
> • Junctive operations: ~~ @foo
> • Accepting qr// or sub{} from the caller and using it on the rhs
> • when(3) which is nice and short.

I would like to add the following case (so we don't have to write
"any"):

• when(3, 4, 5)
(-- used to be when([3, 4, 5]) --) which is nice and short and stands
for:
• when(any(3, 4, 5))


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