develooper Front page | perl.perl5.porters | Postings from July 2012

Re: Smartmatch two cents (was... List::Util... when...)

Thread Previous | Thread Next
From:
Leon Timmermans
Date:
July 4, 2012 02:40
Subject:
Re: Smartmatch two cents (was... List::Util... when...)
Message ID:
CAHhgV8iQ5BVTY-_dEtOX6KGNr-rwhwisu0NJ0oUG8aBSZgSmWg@mail.gmail.com
On Tue, Jul 3, 2012 at 8:02 PM, Jesse Luehrs <doy@tozt.net> wrote:
> This sort of thing is why I never liked the smartmatch behavior for
> arrays and hashes either. It picks one arbitrary interpretation, and
> blesses it with special syntax. Being explicit about what you mean (via
> something like Smart::Match or Perl6::Junction) is a much much better
> idea.

Yeah. I find the arbitrariness much more problematic than anything
else about smartmatch, sometimes it feels like it was designed using
dice. At least with the string/number issue, it's obvious why they
wanted it to work like that.

Leon

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