Using Perl to crowdfund Perl, I love it. Crowdtilt is built with Perl, as is stated on their site's footer, "Powered by Perl Dancer" - https://www.crowdtilt.com/campaigns/specify-module-version-r...
HN user
ironcamel
You had asked for some examples of Perl modules that extend the core language. As was stated by @knighthacker, MooseX::Declare and Test::Class::Sugar are excellent examples:
https://metacpan.org/module/MooseX::Declare https://metacpan.org/module/Test::Class::Sugar
Just look at the SYNOPSIS section for example code. If you know some Perl, you will notice that the code would normally not be valid syntax. Yet simply by using a module, you can define classes (MooseX::Declare) or describe tests (Test::Class::Sugar) in a brand new way.
Yes, I definitely agree that Perl is harder to learn than Python. My point was that people may not have the time or interest to learn Perl, and so when they see Perl code that they do not understand, they blame it on the language instead of their own lack of knowledge.
Perl has a very rich and powerful and expressive grammar. It takes a good bit of effort to learn all of it. Python has opted for a grammer that is much more simple. That definitely has its benefits. For me personally, I feel constrained when writing Python code due to its lack of expressiveness.
The python example you linked to http://eli.thegreenplace.net/2010/06/30/python-internals-add..., which shows an example of adding an 'until' keyword, requires you to recompile the python interpreter. From your article: "After making all the changes and running make, we can run the newly compiled Python and try our new until statement". Of course you can extend any language by recompiling it and creating a new interpreter. That is exactly my point! Perl lets you achieve the same thing simply by using a module from CPAN.
I don't think you have been paying attention to what I have been saying. You keep mentioning that python has strong meta-programming. I never said anything about meta-programming. Perl, python, ruby, everybody can do meta-programming. I said that Perl lets you easily modify the core language grammar via 3rd party modules. This is an extremely powerful feature, if you took a second to think about it.
"As has been alluded to in another comment: Which other languages that compare to perl have you actually looked at?"
I am very familiar with all of the languages that you mention. They are all great languages in their own right. My comment however was about Perl's ability to easily evolve the core language via contributions from its community, as opposed to other languages that require a lenghty process performed by the core maintainers of the language. This allows Perl to evolve at a much faster pace than other languages. A lot of your points do not seem relevant in that context.
"Python has rich meta-programming."
Who cares? So do most modern languages.
"Ruby has (almost) single-handedly super-hyped and re-invented the idea of domain specific languages (DSLs)."
The Perl community has been writing DSL's since before most people had heard of Ruby. Real DSL's. Not just invoking functions without parens and labeling it a DSL, as is often done in the Ruby community. Ruby in no way invented or re-invented anything having to do with DSL's.
"Lisp is of course all about this (as is Forth)."
Agreed. Lisp macros are very powerful. Lisp is a great example of a language that can do this.
"I'm very much on the burnt-by-crazy-old-nasty-perl-legacy-crap side of the fence -- but I can't deny that I see some of the reasons why people would like to use perl -- it's just not for me."
This is a common complaint. People have had to deal with Perl code that they do not understand. It may have been poorly written, or it may have been perfectly written Perl code. If you do not take the time to learn Perl, you would not know the difference. The most common reaction is to blame the language.
"Still -- it's a bit strange to see the claim that perl is somehow much more flexible than other comparable languages."
It may be strange to you because you are not very familiar with Perl.
Those are both excellent examples. One modifies the core language syntax to allow for writing tests in a cleaner and easier way. The other one modifies the language to make writing OO code in a new way, one that will be familiar to Java developers. I don't know of very many languages that allow developers to modify the core language via 3rd party modules. That's why Perl will never die - it will simply evolve as the needs of programmers change. Hey, Smalltalk Roles are a nice idea ... ok we'll add those (Moose::Role). Hmmm, lets allow method signatures to declare types for their params ... sure no problem (MooseX::Method::Signatures). Wouldn't it be cool if we could treat arrays as objects and invoke methods on them? Sure, here you go (autobox::Core).