What is modern Perl? Python. (I'll elaborate more here from my earlier one-word answer).
Long-time perl programmer here, until I found Python. Perl is powerful, but Perl is for the programmer, not the programmer's coworkers. It's not even for the programmer 6 months down the line. This is nothing new, and it has become a stereotype in the community.
Yes, this argument has been made and refuted many times, but I argue the reason isn't the language, but the dominant language paradigms.
Perl's "monk" ideal is not sustainable in the long term, and encourages "clever hackers" who can do things with the fewest lines of fundamentally unreadable code. Yes, the language has evolved. Yes, it is slightly easier to read now. But the goals of the community still tend toward the ideals of becoming a master of arcana who can pass his wisdom down to the less experienced.
Give me a language that the commoners can read, that a beginning programmer can feel empowered to learn because he can take one look at the source code of someone truly experienced and know at least a part of what is going on.
You can change Perl all you want, but you cannot get away from the fundamental guiding principles of the language, which encourage antisocial, clever, and magic code.
I rarely resort to magic code in Perl. I sometimes do because I can't find a better way to do it, and then I comment it as such. Comments are wonderful things when used properly.... If only more programmers in any language used them properly...
I have seen so much really wonderful, readible, maintainable Perl code, that I don't think your characterization works.
You know if I come back a couple months later and don't like my code, I rewrite it based on my objections. It doesn't happen often but it does sometimes. It happens in any language.
If you value maintainability, you will eventually write maintainable code. The only flaw Perl has is in promoting valuing getting things done more than maintainability, but that's a culture of programmers, not the language. You can get good groups together than can write beautiful, maintainable code. I have done it. I know.
I am also a Perl to Python refugee. For most applications I get far more enjoyment out of Python. But try implementing Higher Order Perl in Python and you won't get past Chapter 1 without some weirdness. Using decorators, lambda, map, reduce, itertools, even generators all feel like bending over backwards to achieve what comes naturally in Perl.
This isn't an attack on Python. I'm just saying, Python is not meant for functional programming any more than Perl excels at OO, and that's why I disagree with your thesis.
There is advantage of Perl developers tho. If I hire perl dev I know for sure he is language addict and do stuff efficiently. Because perl developers use Perl not because it paid well (like ruby), but because they like it.
As a Perl and Python developer, I would have to say that my limited experience with Ruby gives me the impression that it's closer to Perl than Python is.
Perl is for having work done in a minimal time. If you want to write code that is easy to read, learn Ada.
Python is probably a better balance. Perl is wonderful for all the small scripts I need every days. When something needs to be reused, it become a module with a good documentation.
I think nobody should read perl code except:
- to learn how to code.
- to modify a program you have written
I'll enjoy Python when pypi doesn't frustrate me many times more than CPAN, there is some Python equivalent of Moose (Python 3.5, 4?) and the grammar is extensible like Perl 5 (using CPAN modules).
Long-time perl programmer here, until I found Python. Perl is powerful, but Perl is for the programmer, not the programmer's coworkers. It's not even for the programmer 6 months down the line. This is nothing new, and it has become a stereotype in the community.
Yes, this argument has been made and refuted many times, but I argue the reason isn't the language, but the dominant language paradigms.
Perl's "monk" ideal is not sustainable in the long term, and encourages "clever hackers" who can do things with the fewest lines of fundamentally unreadable code. Yes, the language has evolved. Yes, it is slightly easier to read now. But the goals of the community still tend toward the ideals of becoming a master of arcana who can pass his wisdom down to the less experienced.
Give me a language that the commoners can read, that a beginning programmer can feel empowered to learn because he can take one look at the source code of someone truly experienced and know at least a part of what is going on.
You can change Perl all you want, but you cannot get away from the fundamental guiding principles of the language, which encourage antisocial, clever, and magic code.