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

Re: smartmatch needs your eyes

Thread Previous | Thread Next
From:
Aristotle Pagaltzis
Date:
September 21, 2015 05:45
Subject:
Re: smartmatch needs your eyes
Message ID:
20150921054455.GA52923@plasmasturm.org
* Father Chrysostomos <sprout@cpan.org> [2015-09-21 02:30]:
> Aristotle wrote:
> > In $x ~~ $y with $y eq 42 you cannot tell whether the user wanted
> > the smartmatch to mean $x == 42 or $x eq 42. You can only tell that
> > when the user has given you a literal 42 vs a literal '42'.
>
> The Last Time Round, someone pointed out that the only really logical
> way out of this is just to do eq, not ==/eq based on whether the rhs
> is a number or string.

Yeah, I came around to that in discussion on IRC later.

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