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

Re: Revisiting smart match

Thread Previous | Thread Next
From:
Father Chrysostomos
Date:
August 2, 2017 23:30
Subject:
Re: Revisiting smart match
Message ID:
20170802233047.6030.qmail@lists-nntp.develooper.com
Sawyer X wrote:
> >     2 (optional): plain string (defined, non-glob, non-regexp, non-ref
> >        scalar) on the RHS: $lhs eq $rhs
> 
> This is tricky. "eq" feels more common but I cannot see it as
> necessarily less arbitrary than ==.

It is less arbitrary, because it is more versatile.  You can do
'0+$x eq 0+$y', but you cannot use == for string comparison.

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