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

Re: Revisiting smart match

Thread Previous | Thread Next
From:
Zefram
Date:
December 19, 2017 04:21
Subject:
Re: Revisiting smart match
Message ID:
20171219042102.GV25404@fysh.org
Karen Etheridge wrote:
>Why can't when_or_whatever_it_is(...) simply evaluate the expression
>inside, no matter what that expression is?

It does always evaluate it.  The question is then how it'll use the
value.  The old "when" sometimes uses the value as a truth value, and
sometimes uses it as a smartmatcher to apply to $_.  That's a layer of
confusion on top of the amazingly complex rules for smartmatch itself.
We've determined that both of these layers of confusion have to go.

-zefram

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