top | item 1337668

Why Perl isn't Going Away Soon (Or Ever)

34 points| fogus | 16 years ago |ostatic.com | reply

87 comments

order
[+] gamache|16 years ago|reply
Article's conclusion: After a short lapse, Perl development is picking up and enthusiasm for Perl 5 is as strong as ever.

I would agree. A little over a decade ago, Perl suffered from the same problems which plagued JavaScript in its early days: ease of writing shitty code, mountains of shitty sample code, and a community which did not vehemently encourage the writing of unshitty code.

This caused a backlash which lasted several years, during which the programming public panned the languages almost universally.

But a funny thing happened; rather than shriveling up and going away, the languages and their practitioners matured. Community focus became less centered on glue code and scrolling effects, and attention was shifted to writing clean, maintainable code which uses the language's best features (metaprogramming, easy hash/object manipulation, etc) in manageable, modular ways.

Now both ecosystems are flourishing, and though Perl doesn't have quite the install base of JavaScript, it's still a viable contender to Ruby and Python in their areas of expertise, and it can be called the best tool for some of those jobs.

[+] bobbyi|16 years ago|reply
ease of writing shitty code, mountains of shitty sample code, and a community which did not vehemently encourage the writing of unshitty code. This caused a backlash which lasted several years, during which the programming public panned the languages almost universally.

That's not how I remember it. Perl usage started to really fall off when PHP became popular and replaced modperl/ cgi scripts as the common way of throwing together a dynamic webpage. PHP is a language famous for letting people write shitty code and having a "community" that doesn't discourage it.

[+] plinkplonk|16 years ago|reply
"Perl development is picking up and enthusiasm for Perl 5 is as strong as ever."

I will take your word for it, but I do have to say (speaking as someone with a lot of grey in his hair) that I haven't seen a young developer choose to work primarily in perl (over ruby or Python or Java or C#) in ages. Most new projects/startups don't seem to choose perl as their primary language.

I readily concede that this is probably an artifact of my limited experience with perl. Just noting what I see, not looking for a flame war.

How many of YC companies use perl do you think?

[+] sabat|16 years ago|reply
enthusiasm for Perl 5 is as strong as ever

That's probably something of an overstatement, but I've written Perl in the past months for gigs, even though I have long abandoned it for Ruby. I don't know that I'd call the general interest in Perl5 "enthusiasm" -- that's a word I'd save for Ruby/RoR and maybe Python and DJ Ango. ;-p :-)

Perl5 is mature. There are modules for anything you can imagine, and most seem to be well-maintained. It's still useful, if someone antiquated in feel.

Perl6: that's another story. It's DOA. People will point to this implementation and that one, but the lack of a reference implementation, along with the long development time, makes Perl6 the Duke Nukem Forever of scripting.

[+] jbellis|16 years ago|reply
Bet you didn't know there was a [relatively] new COBOL-2002, either.

(If I were snarky, I would note that the next COBOL spec after that -- yes, there is one -- might well be released before perl 6.)

[+] nailer|16 years ago|reply
No technology ever goes away. Nobody is saying Perl won't be developed, just that people are less likely to use other languages for new projects in favor of newer technologies.
[+] DrSprout|16 years ago|reply
The article still makes an excellent point, which is that the difference between most of the 'newer technologies' and Perl is basically marketing, not any actual superiority of language design. You can write line noise in Perl, but you can also write Python in Perl. It may not be quite as pretty as Python, but as far as use in a production environment it will be equally useful.
[+] geoffc|16 years ago|reply
CPAN is the killer app for Perl. Every time I flip across to another language I usually love the syntax and structures but the lack of a CPAN equivalent is always grating and I usually end up right back at Perl to get stuff done fast.
[+] garyrichardson|16 years ago|reply
I used to think this way. After living without CPAN for 3 years using different languages, I appreciate the lack of dependency additions my projects get.

The problem with CPAN is the same things as RPM hell or DLL hell, only worse and more fragile. On a large project, you really don't want to randomly upgrade your DBI module, or some other small perl package that may bring your whole project down. But then one day you need to use Net::SSH and it wants to upgrade DBI::Search for some bizarre reason, which requires you to compile a beta version of the GZIP library because it's using some new interface that's not included with your CentOS 5 install. Then you find out DBI::Search requires DBI 1.41 and you're only using 1.40. There's a backwards incompatible behavior that affects your code in 1.41, which is why you haven't upgraded yet. You go through all 100k lines of your project and make sure all the DBI code handles this new case.

Then you have to try and install the changes on all 75 of your servers. You may have some sort of capistrano script to make this simpler, or you may have used RPM versions of your CPAN packages. Neither solution is less painful than the other. CPAN wasn't really designed to work with your sysadmin's workflow, so neither solution is particularly useful.

At the end of the day, you would have spent less time just writing the damn code yourself to call out to the ssh binary.

[+] davidw|16 years ago|reply
Hah, what's funny is that Jeff Hobbs, the author of the article, is one of the main Tcl developers.
[+] jgrahamc|16 years ago|reply
Except, that Jeff (who used to work for me at Scriptics) is a pragmatic kind of guy and is likely to not allow his allegiance to Tcl prevent him from seeing what else is going on out there.
[+] eli|16 years ago|reply
...because it's holding the entire internet together?
[+] plinkplonk|16 years ago|reply
"because it's holding the entire internet together?"

Could someone explain what this means in some detail? I hear this all the time but I could never make any sense out of it. Sure once upon a time perl was the best way to get cgi scripts running and do some web programming. Other than this piece of history, any specific examples of the "holding the internet together" property perl is supposed to have? What part of critical internet infrastructure depends on perl?

I am no networking expert but it seems to me that a lot of the infrastructure (apache, tcp/ip stacks etc) is written in C. How (specifically) does perl hold the internet together any more than any other scripting language? Or is this jusr something perl aficionados tell each other ?

[+] silentium|16 years ago|reply
...because it is my duct tape
[+] pstevensza|16 years ago|reply
+1

...and it is my glue. So many things in my environment wouldn't happen to be able to talk to each other if it weren't for Perl.

[+] huherto|16 years ago|reply
Does any body remember when Larry Wall and others were rewriting all the Unix commands in Perl? I thought that was cool but I never heard of it again, and haven't been able to find references to it.
[+] avar|16 years ago|reply
You're probably talking about the long dead one-man project to rewrite all the /bin/* utilities in Perl. That had nothing to do with Larry Wall.
[+] jergosh|16 years ago|reply
The whole article fails to mention any advantage of Perl over the languages it's compared to (wonder why). The sooner Perl falls into obscurity, the better.
[+] DrSprout|16 years ago|reply
I currently code for my day job in a proprietary extension to a proprietary dialect of BASIC from the mid-80's. This language is legitimately broken, and has significant disadvantages at every turn. It has no real functions, no block-level scoping, lists are stored as delimited strings, there are no hashes, and nothing even resembling objects.

Perl has all of these things. If you're coding in Perl and you write bad code, it's your fault. If Perl has a fault, it's that it's easy to write code that you think is done, when you have more work to do if you want to develop a full-scale application. However, you can write incomplete but good-enough code in any language. (And I will always use Perl to write once-off scripts. It's perfect for that task.)

[+] ledger123|16 years ago|reply
"The answers are longevity, maturity, and a rich ecosystem of development tools and modules that developers can leverage for almost any programming task. Consider the Comprehensive Perl Archive Network (CPAN). CPAN is an enormous collection of software and documentation, largely unmatched outside of the Perl community. Yes, other languages have similar repositories patterned after CPAN -- but thus far none have matched CPAN for its size and scope. CPAN continues to grow at a rapid clip."
[+] flogic|16 years ago|reply
That's because Perl Python and Ruby offer essentially the same feature set. The only significant differences are syntax and CPAN.
[+] T_S_|16 years ago|reply
Did you perhaps mean perl 5.8?