develooper Front page | perl.perl5.porters | Postings from September 2015

Re: smartmatch needs your eyes

Thread Previous | Thread Next
Eric Brine
September 10, 2015 20:04
Re: smartmatch needs your eyes
Message ID:
On Thu, Sep 10, 2015 at 11:26 AM, Ricardo Signes <>

>   # Why do we warn on smart match in void?  smart match can have side
> effects
>   # like capturing or whatever the subroutine does.  I'm not sold on this
>   # warning. -- rjbs, 2015-09-09
>   # $_ ~~ \&test;

So can `$_ eq $obj`, yet we want that to warn. I don't believe we want C++
where `<<` can do anything; we still expect `~~` to perform a smart match
even if the specific definition of that is customizable.

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