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

Re: pounding the smartmatch drum

Thread Previous | Thread Next
From:
Zefram
Date:
September 5, 2016 13:51
Subject:
Re: pounding the smartmatch drum
Message ID:
20160905135052.GM7097@fysh.org
We should either fix it or kill it.  Fixing it should take the form of
reducing the matching behaviour table to just a handful of rows, of which
the main one relies on ~~ overloading on the rhs.  Tony's branch mostly
does this.  However, I disagree with permitting overloading on the lhs.
That part of Tony's branch (which is also not properly documented) should
be ripped out.  The type of matching to perform should be determined
entirely by the rhs, and any type of matching that amounts to "ask
the lhs whether it matches" is too surprising and not useful enough to
warrant being a built-in matching rule.

-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