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

Re: Revisiting smart match

Thread Previous | Thread Next
From:
Father Chrysostomos
Date:
December 28, 2017 21:25
Subject:
Re: Revisiting smart match
Message ID:
20171228212508.17063.qmail@lists-nntp.develooper.com
James Keenan wrote:
> On 12/26/2017 08:29 AM, Leon Timmermans wrote:
> > What if we removed it from core, but left enough hooks so that we can
> > republish it as a module (let's call it smartmatch::traditional for the
> > moment). That way users can write code that will work on both previous
> > versions of perl with the current smartmatching, and future perls that
> > have extirpated it from core. Better yet this allows the wider community
> > on CPAN to come up with better smartmatch implementations.
> >     
> > Leon
> 
> That's an idea that warrants serious investigation!

It is already quite possible to implement one's own switch state-
ment, even without removing it from core, using the pluggable
keyword interface (e.g., via Keyword::Simple), and by hooking
PL_check[OP_SMARTMATCH] the way that many existing modules already do
for other ops (e.g., autovivification, arybase).

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