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

Re: YA smartmatch proposal [ was: Re: smartmatch needs your eyes]

Thread Previous | Thread Next
From:
Eirik Berg Hanssen
Date:
October 12, 2015 19:25
Subject:
Re: YA smartmatch proposal [ was: Re: smartmatch needs your eyes]
Message ID:
CAHAeAG6mW4BppUomCrZr-ik0tLYb_HxGv58uUPjCeS+7NvUq9Q@mail.gmail.com
On Mon, Oct 12, 2015 at 7:07 PM, Abigail <abigail@abigail.be> wrote:

> This is Perl. You can't even trust the source code:
>
>
>     use constant;
>     use overload::constant integer => sub {"$_[0]"};
>
>
>     when (3) {...}   # What does this do? 'eq' or '=='?
>

  Aside from the fact that anyone doing that deserves whatever surprises
pop up …

  … if the intention is explicated, neither perl nor the maintainer need
wonder:

  scase 3 {…} # does 'eq', whatever "type" 3 might be ;-)


Eirik

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