Why Perl?
Gladly I find myself needing to answer this question a lot less than I did a few years ago. Due to a combination of new talent into our community (many who came to Perl because of awesome modern projects like Catalyst, DBIx::Class, Moose and now Plack) and a renewed drive toward improving communication (via things like Ironman Perl, Perl Blogs and updated documentation for newcomers) I personally believe that Perl has made a good start at closing the gap between our community’s perception of our beloved programming language and the perception Perl has in the general world of our IT peers. That is to say, we know Perl rocks and we are much better at letting the world know it too!
Given that reality I generally prefer to not write defensive articles explaining why I think Perl is a good choice for application development and instead rather go on the offense by contributing code, working examples, and all that. However since I will be shortly teaching a Perl class here in NYC (more on that in a bit), I think a short Perl promotional may be in order. So, in no particular order, are some of my top reasons for using Perl (and why you might like Perl as well).
Perl Programmers love their language. For most Perl programmers, using Perl is more than a job; it is part of one’s identity. When using Perl I often feel like I am part of something greater than then individual code I may be writing at this temporal moment. Objective studies seem to validate this anecdotal experience.
True Freedom. Perl is free software / open source software. This means I can always find the source code and often can find the core developers in charge of some code. I never need to worry about when some company is going to service my bug ticket and I am never hostage to the changing whim of corporate strategy. Although many pretenders proclaim to be free software, I think Perl is more free than many mainstream programming languages since there is no single direct corporate sponsor of Perl which has competing interest between dedication to free software and the requirement to put their business needs first. Compare this to other projects that claim to be free, such as MySQL, Android and Java, all of which have at one time or another in the recent past demonstrated corporate encumbrances. Because of this true freedom the Perl community is completely in charge of itself and has spent years doing the hard job of self-organizing and learning to coordinate our long-term objectives.
Great Community. Since Perl programmers know that the future of our language is solely in our own hands, this has fostered a strong sense of community and shared destiny. This is not to say we live in a sort of new Eden, certainly there are arguments and differences of opinion. However our willingness to respect those who prove their point with code and not just words enhances our contentious meritocracy for the benefit of all.
CPAN. Quite simply there is nothing like it and it gets better all the time. With Perl you have one command access to literally tens of thousands of open sourced modules, covering everything from the quirky to the religious to the serious. Additionally, CPAN is more than just the free modules; its ecosystem includes a distributed delivery system as well as a test collection framework (more than 16 million tests collected across a variety of platforms and Perl versions).
Awesome Tools. Although it goes without saying that my CPAN comment above would cover this, I think it is worth a shout out to a few of my personal favorites, without which I might have left the Perl community years ago.
- Moose and the extended MooseX software ecosystem. Simply the best way to model objects in Perl or any other language as far as I am concerned.
- Plack. This creates a strong foundation for web application building in Perl that is easy on developers, straightforward to deploy and encourages an unprecedented level of cooperation between all the different frameworks for authoring dynamic websites.
- DBIx::Class. An object relational mapping framework that doesn’t suck and makes sense to developers. The foundation of a well architected system.
- Catalyst. My personal favorite way to write a website of more than middling complexity.
- Perlbrew, local::lib, Module::Install. A great tool-chain for developers to organize, code and distribute applications.
- Test::*. Perl just has the best and most developer friendly testing code. No surprise we have such a strong, test centered culture!
Awesome Third Party Support. Want to connect to Twitter? Access Facebook? Search with Google, or Bing? Want to deploy or manage your EC2 clouds? Or maybe you like Rackspace? Maybe you love Github? Or you are using a Platform as a Service provide like Dotcloud or Stackato for easy deployment? Perl has you covered for this and much, much more!
Jobs. Shutterstock.com is always looking for awesome Perl developers. In addition, Perl jobs tend to be very developer centered. The best Perl developers are often respected within their companies. My personal experience as an IT worker has been significantly better than the average of my peers in other languages. As a Perl developer, I have never interviewed and been hired into a job that I regretted or didn’t like at a later date.
Thanks for tuning in, and I'd love to hear more from you all regarding your favorite things about Perl!
@Ada:
C: nginx: I find it hard to call a webserver 'innovative'. Better implemented than other ones (maybe?), but the http protocol is quite old and well stablished by now, don't you think?
Java: Solr. Nice app (never used it, looks good). But this is a search engine, nothing innovative here.
C++: MongoDB. A database server. Again, nothing really innovative here.
Posted by: oxtan | 10/10/2011 at 02:42 AM
Apache Lucy is a recent project, a search engine designed for dynamic languages, written in C with a Perl reference implementation.
https://metacpan.org/module/Lucy
nginx is a great webserver indeed, implemented in C with exclusive embedded support for Perl. No PHP, no Ruby, no Python.
Posted by: rodrigo | 10/10/2011 at 11:02 AM
If someone want to know seriously about the "innovations of the just the interpreter", and not all the Perl ecosystem of CPAN + projects + people using it, then why do not take a look into:
http://perldoc.perl.org/index-history.html
Greetings :-)
Posted by: Poisonbit.wordpress.com | 10/10/2011 at 11:14 AM
Sorry, me again:
@Ada: Also memcached and gearman started as Perl projects, I think you should not "discard" very well known software as clear examples, but anyway...
And, If I remember OK, the VMware oficial Perl API and installer has been there since the beginnings...
And... one last: The Lacuna expanse ! :)
And you know, like xkcd, the last record of "fix this now" was done (as always is) using Perl.
Which language used the last record of "cool expensive fail" project ?
Posted by: Poisonbit.wordpress.com | 10/10/2011 at 11:27 AM
@Ada: if you think "those giant web services do qualify as a huge success for their respective programming languages", take a look at Booking.com, written in Perl and growing fast (and we're hiring!). Does this qualify as a huge success?
Posted by: brunorc | 10/10/2011 at 01:04 PM
Why feed the troll?
Posted by: Bill Ruppert | 10/10/2011 at 04:01 PM
My first language was COBOL, and I've earned my living writing assembler, C, Fortran, and have written code in several others like algol and bliss, but once I learned perl, I've been reluctant to code in anything else and havn't needed to since it has provided my livelyhood for a couple decades. I'm amazed at how powerful expressiveness in this "dead" language is. Of course my other favorite dead language is teco.
Posted by: Ralph Winslow | 10/10/2011 at 06:09 PM
What about all the stuff that came from Danga: memcached, geraman, perlbal, mogilefs.. AFAIK all those stared out as perl progs (with optional C parts)?
Mojolicious borrows a lot but also has innovations if its own. Anyevent seems novel to me, but twisted might have the same separation? Don't know who borrowed from who..
Posted by: Øyvind Irathernot | 10/11/2011 at 05:14 AM
memcached, http://code.google.com/p/y2038/, Moose (ported to JavaScript), partially git. nginx was created by Rambler which wrote it for Perl-based web sites.
Posted by: chorny | 10/13/2011 at 08:46 AM
Moose is a sign of Perl's death, not of hope for its future. It just highlights the core language's deficiencies.
Ten years ago, Perl was, indeed, a great language compared to the alternatives. Since then, Ruby and Python have grown into better languages than perl. They are both much more elegant and congenial to work in.
Six years ago, I could argue that CPAN was a good reason for doing new development in Perl, but today there's so much good code in the standard Python distribution that this argument no longer holds. At one point, it seemed like the best developers were contributing to Perl, but today they're in the Python community.
Posted by: Molecule61 | 10/27/2011 at 06:22 PM
@ada "What would be the point of learning a language that the creative minds obviously left many years ago?"
I'm sorry, would you first prove that your hyperbolic statement is even remotely true? What creative minds have so obviously left?
Start listing them out. Or perhaps you are pulling these "facts" out of thin air?
Posted by: jeffa | 12/27/2011 at 01:48 PM
@PerlDean "if your [Ada] language is best, why not spend your time coding in it rather than posting about how perl is dead?"
Perhaps "ada" is a corporate shill who is getting paid to post these trollish comments?
Posted by: jeffa | 12/27/2011 at 01:50 PM
@ada "Perl is factually dead because there are no truly original projects developed in it anymore, all the cool stuff gets invented in other languages and later ported to Perl. That's surely not something to be proud of and that should be celebrated like this."
OK .... now we get the meet of ada' message. How dare you John? Have you no shame John? How dare you advocate Perl.
That is just wrong. You should be ashamed of yourself, John, for praising Perl. For choosing Perl.
Honestly John -- i would have deleted ada's comments a long time ago and blocked that troll from spreading such hatred, especially for using such even-tempered language that puts us on the defensive. They clearly hate Perl and want everyone to stop using it.
Who would honestly want this in the Open Source World? I can't think of anyone, yet here they are --- trolling instead of coding. Speaking of coding ...
Posted by: jeffa | 12/27/2011 at 01:56 PM
No ... i have to flog this dead horse one more time! :)
This article and comments are more than 1 year old. Yet here i am, still programming Perl professionally.
Perl has been announced dead every year for the past decade, and here we still are, programming Perl professionally.
Any haters can put that in their pipe and start smoking --- cuz we ain't going away!
Posted by: jeffa | 12/27/2011 at 01:59 PM
Not really into feeding trolls, but "Markdown" comes to mind.
Posted by: garu | 12/29/2011 at 03:25 AM
Java is considered a safe choice because it can solve many problems and it has sufficient market penetration that it currently is not viewed as a risky choice.
Posted by: Web Developer | 03/27/2012 at 02:34 AM
I wanted to learn Perl for web development projects, but the only thing that I find wrong with it is that some of the things they go over could have been worded in a much more understandable way.
Posted by: Web Developer | 05/14/2012 at 06:44 AM