Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Pluggable keywords

by szabgab (Priest)
on Dec 28, 2010 at 04:29 UTC ( #879363=perlquestion: print w/ replies, xml ) Need Help??
szabgab has asked for the wisdom of the Perl Monks concerning the following question:

Since the release of perl 5.12 people can write extension to perl pluggin in their own syntax. Perl itself comes with a sample module called XS::APItest::KeywordRPN.

Are there any other modules using this feature? Do you know about anything outside CPAN using it or experimenting with it alread?

Comment on Pluggable keywords
Re: Pluggable keywords
by Anonymous Monk on Dec 28, 2010 at 05:55 UTC

    Pluggable keywords, Regex engines, new syntax etc, have all been very helpful in doing Perl PR. But their actual power isn't being made use of the way it should be.

    Above all lack of a common standards and efficiency related issues still prevent many from using them in Production environments. Now you can throw in the Nothing/everything is production ready card and argue it is! But its not according to most commonly accepted standards. Additionally things like having to install a dozen modules and call them to do a small method call is not something many want to do. Packaging, Distributing and maintenance issues are few more blockers.

      But their actual power isn't being made use of the way it should be.

      I disagree.

      In my book, pluggable keywords "should be" used not by every other module. Their real power is that they allow modules to do the syntax experiments that would otherwise need to happen in core, or that would require source filter (which have such a bad stigma that nobody wants to use modules based on source filters. With good reason).

      You could argue that the many different object systems on CPAN make life harder for the casual programmer, but without them we wouldn't have seen the rise of Moose, which IMHO is beneficial for the whole Perl community.

      I guess syntax extensions will evolve the same way: there will be many experiments, and after a while some will emerge as quasi standards. If they mature, and impose little performance penalty, maybe they will be merged into "core" Perl at some point. Or maybe not.

      So the real power of syntax extensions comes from moving the language design from p5p to the community as a whole. Which is a very good thing.

        If they mature, and impose little performance penalty, maybe they will be merged into "core" Perl at some point.
        Extremely unlikely. In fact, such a keyword has just successfully proved it does not need to be part of the core, and can very well exist as a CPAN module. I'm not saying I complete agree with that sentiment, but it seems to be the current p5p policy.
Re: Pluggable keywords
by Khen1950fx (Canon) on Dec 28, 2010 at 08:08 UTC

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://879363]
Approved by Arunbear
Front-paged by Arunbear
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (13)
As of 2014-08-20 18:46 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (121 votes), past polls