I didn't say I had to deal with perl code I didn't understand, just nasty perl code. Of course the coder in question is the problem, not the language as such -- I've just seen more obscure hacked together perl code than eg: python.
I'm perfectly aware this is a subjective opinion: I don't like perl very much. I never claimed everyone else should dislike perl -- in fact I stated the opposite -- I see why it appeals to some people.
> 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.
> "Python has rich meta-programming."
>> Who cares? So do most modern languages.
Well, your claim is that perl has strong meta programming, and that perl programmers use it -- implying that eg: python programmers choose not to, and rather sit on their hands waiting for Guido to bless their new data structure or syntactic sugar for improving arrays?
I suppose this your "lengthy process" ? But the set module was available before it became part of the core language, so if you were the programmer that needed a new datatype nothing stopped you from implementing it and uploading it to the package index? (Although I don't remember quite how well the package index worked back in 2000 -- CPAN certainly has a long and solid history behind it :-)
As for ruby, note I said "super-hyped". Maybe I should've said "re-introduced", or "introduced to a new generation of programmers", rather than "re-invented".
> It may be strange to you because you are not very familiar with Perl.
Perhaps. I would be very much interested in some examples of the DSLs you speak of. I guess perls regex-handling would lend itself to be used as a poor man's Standard MetaLanguage?
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.
Yes, I should have been clearer in my previous comment: What I meant to say was that I see what the previous poster meant, and I was wrong.
However, if someone wants to do something similar in Python, here are how you would (have) to do it. I didn't mean to say that it was the same - or as straightforward.
This is also why I linked to the r(estricted)python examples with pypy -- because they give you more of the power to define a whole language -- but that also isn't the same as being able to do it within the language itself.
As for meta-programming, I have always meant that in the sense of lisp macros, not simply chaining some cleverly named functions.
I'm still not convinced it's a feature I would want in Perl -- but then again, I don't particularly like Perl, and I don't use it -- so clearly what I think of it doesn't matter: I'm not the target audience for Perl features.
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:
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.
I'm perfectly aware this is a subjective opinion: I don't like perl very much. I never claimed everyone else should dislike perl -- in fact I stated the opposite -- I see why it appeals to some people.
> 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.
> "Python has rich meta-programming." >> Who cares? So do most modern languages.
Well, your claim is that perl has strong meta programming, and that perl programmers use it -- implying that eg: python programmers choose not to, and rather sit on their hands waiting for Guido to bless their new data structure or syntactic sugar for improving arrays?
See eg: http://www.python.org/dev/peps/pep-0218/
I suppose this your "lengthy process" ? But the set module was available before it became part of the core language, so if you were the programmer that needed a new datatype nothing stopped you from implementing it and uploading it to the package index? (Although I don't remember quite how well the package index worked back in 2000 -- CPAN certainly has a long and solid history behind it :-)
For another example (again python):
http://kashif.razzaqui.com/30414548 "Javascript's Prototype Inheritance in Python"
As for ruby, note I said "super-hyped". Maybe I should've said "re-introduced", or "introduced to a new generation of programmers", rather than "re-invented".
> It may be strange to you because you are not very familiar with Perl.
Perhaps. I would be very much interested in some examples of the DSLs you speak of. I guess perls regex-handling would lend itself to be used as a poor man's Standard MetaLanguage?