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

Re: fixing smartmatch just hard enough (and when, too)

Thread Previous | Thread Next
From:
Ricardo Signes
Date:
September 1, 2012 08:43
Subject:
Re: fixing smartmatch just hard enough (and when, too)
Message ID:
20120901154339.GA1769@cancer.codesimply.com
* Leon Timmermans <fawaka@gmail.com> [2012-09-01T10:44:44]
> On Sat, Sep 1, 2012 at 4:33 PM, Aaron Priven <aaron@priven.com> wrote:
> > is it possible to add a binary infix operator in a Perl 5 module?
> 
> I don't think so (though never say never, who knows what edge-case
> someone may be able to find). You could use the keywords mechanism to
> some degree for named operators, but I suspect you can't get the
> precedence right for most purposes (at least on the left side). I
> think it could be very useful to have this ability, but AFAIK that'd
> be non-trivial to implement.

That is also my understanding: it would be great if it existed and worked, but
it doesn't, and would be hard to make happen.

-- 
rjbs

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