Perl: Kicking your languages ass since 1988
markmaunder.com
markmaunder.com
It definitely left me with a lasting impression.
[ Note: I'm not talking about bad code in the languages core interpreter/compiler/vm nor am I talking about poor design decisions in the languages themselves. ]
It's not that bad language yields bad code, it's that people who are picky want good code AND the best language to express it in. In some folk's minds, there are languages available to them that have the same strengths as Perl, can be used in the same role as Perl, and yet have less of it's imperfections. I think that's the strongest case against it. Not that it is a "bad" language, necessarily.
Can you for example show me which of those languages have a better OO system than Perl 5 with Moose? Oh my, how things change... :-)
I'd argue that Perl's main disadvantages are two -- the relentless trolling and that it probably has a bit harder learning curve for people to do it right.
(Java isn't really in the same niche; it is more of a system language and e.g. doesn't compete in development speed with scripting languages. How is it these days -- the scripting languages on the JVM are still mostly interpreted, btw?)
I remember a few years ago when I wrote Perl OO and said, "I wish this was more like Common Lisp". Now I can barely get past "(defclass" without wishing I was using Perl instead. (And then I usually switch the project to Perl; the 8-billion-x or whatever speed hit is well worth Moose's design sugar.)
Anyway, I spend a lot of time thinking about programming and application design, and I just can't get Clojure or Ruby or Python or Java to a point where they could be usable for the kinds of things I do. And Perl already has everything I would need to add to those languages.
The only other language I really like is Haskell. It is much better than Perl. But Perl has so many good libraries (and great library authors), that I don't see myself switching completely to Haskell for a long time. I can stand a little bit of computer science imperfection if it means I have an application that works. With Perl, I always end up with an application that works.
Honestly, hating Perl and then saying to use Ruby or Python or Clojure instead is kind of silly. All languages in this category have the same fundamental weaknesses... they just all spell the weaknesses differently.
Yes. Just because Perl's object model from the late 90's was written in C, doesn't damn C to the unspeakable depths. It just seems that way in the moment. </humor>
(My first industry job was writing Perl.)
It's more accurate to say that "Just because Larry borrowed Perl 5's object model from Python doesn't mean that...." Yet there are many ways to end that sentence.
Mark: "Perl is a powerful language. It’s also fast and everything you need has already been implemented, debugged, refactored, reimplemented and made rock solid. If you ever have a problem, it’s already been solved by someone else."
Me: "That's just what I've been saying all this time! Everything that can be invented has already been invented. Don't waste your time trying to do it better, you silly young bucks.
Now get off my damn lawn!"
Basically, there's no point in re-inventing the wheel unless you're meaning to improve the existing implementation or at least bring something new to the table. Too many times things are re-implemented and labelled as 'new and improved' even though they are a decided step backwards.
All of that said, I think that original statement was meant to be a push-back against the prevailing 'wisdom' that Perl is dead and that you should really be onto something like Python or Ruby like all of the 'cool kids' are doing. (i.e. "Don't discount Perl, it has many solutions to offer you.")
I'm not sure I believe any serious Perl programmer never run into those problems.
Very few modules are actually "built". Most building is just "cp lib/* $PERL5LIB". If you mean some module required a newer version of another module, and that new module was installed... yeah, that happens. That's why there's a dependency management system.
There are broken modules, there are specific-distro-and-version-only modules, there are undocumented modules, etc.
Some people think one bad apple spoils the whole bunch. Others think a rotten apple is better than no apple at all. It's usually the second group that has working applications, and the first group that whines on social news sites about how bad everything is. Just sayin'.
I'm not even saying that CPAN is bad in any specific way. But it's by no means perfect, or close to the description he gave. Neither is any other language / package system. It's just annoying when someone claims something like that.
Edit: My point was that the interpretation was a bit ridiculous, considering the context. Don't drag up examples of kernel modules written in scripting languages, please. (I think I've seen some articles myself.) :-)
If you just want to copy files from lib/ to your system @INC, then sure, go ahead. But then you are throwing away any stability guarantees in favor of "BUT I WANT IT NOW!!!"
... or, in many cases, the test is wrong in some fashion. This pushes the responsibility to the person running the test to report the failure and the distribution maintainer to fix the problem.
BTW, I'm a huge fan of Ruby. I sincerely hope it has the legs Perl has and one day is it's equal or better. Perl's invent-your-own-OO-syntax is it's worst weakness - and that's what Ruby brings IMHO. So I'm very grateful to all the early adopters who are so passionate about Ruby.
Having said all that, keep a close eye on Perl 6. There will be some big developments/announcements this year.
That being said, there are a number of languages that have things in them that feel like dirty, dirty hacks. There are few languages that are fee from these sorts of things.
Fixed that for you! </humor>
Ruby is 15 years old. When do users stop being considered "early adopters"?
The de jure successor of Perl 5 might be Perl 6, but the de facto successor is Ruby. That is where the momentum and mindshare has gone; my impression is that Perl is easing back into it's old home as AWK's big brother. In all honesty, how often do you hear about somebody writing a web application in Perl these days? While my personal experience isn't really admissible as evidence, all the people I know who used to write web apps in Perl are now writing web apps in Ruby. A bunch of the ones who used to do system administration with Perl are now working at Opscode doing systems administration in Ruby.
(And then, the hype and FUD is quite heavy on the ground, re Perl. Not least on HN.)
my company's 10-year old Perl webapps are still chugging along just fine, btw.