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

Re: fixing smartmatch (again (still))

Thread Previous | Thread Next
David Golden
August 28, 2012 15:53
Re: fixing smartmatch (again (still))
Message ID:
On Tue, Aug 28, 2012 at 5:06 PM, Jesse Luehrs <> wrote:

> I think people will have fewer reservations about accepting weird
> special cases like this for a keyword-based control structure
> (especially considering the precedent set by while (<>), etc) than for
> an infix operator (since it will be a weird special case either way -
> "why can i do '$foo ~~ 1', but not '$a = 1; $foo ~~ $a'?".
The opportunity for confusion exists either way.  My suggestion is to
change *one* thing -- smartmatch -- instead of *two* things -- smartmatch
and when.

Then all people have to know/relearn is the smartmatch table, not the
smartmatch table *and* the special case rules for when.


*David Golden* <>
*Take back your inbox!* →
Twitter/IRC: @xdg

Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About