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!
How can you praise Perl for having projects that are merely ports of projects from other languages, like Plack?
What truly original ideas have originated from the Perl community in recent years?
The success of a language is measured by innovation, not imitation.
Posted by: Ada | 10/07/2011 at 07:09 PM
@Ada
> What truly original ideas have originated from the Perl community in recent years?
Yes, Moose
Python's bullwinkel
http://code.google.com/p/bullwinkle/
Ruby's doodle
http://doodle.rubyforge.org/
http://transfixedbutnotdead.com/2008/03/12/doodling-with-moose-part-1/
Javascript's joose
http://code.google.com/p/joose-js/
Posted by: Account Deleted | 10/07/2011 at 08:25 PM
None of those Moose clones seem even remotely popular.
Posted by: Ada | 10/08/2011 at 01:33 AM
@Ada I believe that PHP are about to add support for roles (in some manner), which is part of the awesomeness that is Moose.
I also don't see any shame in admitting that other communities have good ideas and borrowing them.
Posted by: Adam | 10/08/2011 at 02:42 AM
I have omitted Devel::NYTProf, which is an excellent profiler developed originally at the New York Times. http://search.cpan.org/dist/Devel-NYTProf/
I dont think much of their publication, but i really like their profiler.
Posted by: PerlDean | 10/08/2011 at 03:13 AM
@Ada You seem to be unfamiliar with Moose or any of the derived counterparts (in other languages) that implement meta-programming. If that's true, then your ability to take such a position is severely lacking.
Posted by: _anaio | 10/08/2011 at 03:23 AM
@Adam Nothing wrong with borrowing from other communities, as long as your own produces innovations too.
But please show me just one technology that has been developed within the Perl community during the last few years and that became popular in the outside world.
Roles are surely not an original Perl concept, http://dl.acm.org/citation.cfm?id=230540.
Posted by: Ada | 10/08/2011 at 03:31 AM
@anaio My point is that what you lot are calling "Modern Perl" is just a bunch of libraries ported from other languages, not a single item is truly original or special.
What would be the point of learning a language that the creative minds obviously left many years ago?
Let me repeat myself, i hereby challenge you to show me just one thing the Perl community has developed during the last few years that became popular in the outside world!
Posted by: Ada | 10/08/2011 at 03:41 AM
Quoting Ada:
"The success of a language is measured by innovation, not imitation."
Oh? says who? What are the 'innovations' in C/Java/C++/C# in the latest years? I hope you will not dare to affirm those languages are not successful either :-)
Maybe those languages, just like Perl, do not need to 'innovate' because (gasp!) they already are pretty good.
Posted by: oxtan | 10/08/2011 at 04:31 AM
@Ada Well, Perl's strength has always been that it has taken the good things from other sources and mashed them together in a way that gives it greater utility. Perl has always been a pragmatic language with a pragmatic community. Being the first at doing something doesn't mean it is the best. I prefer the quality of implementation that I get from most high-profile Perl projects than the newest shiny any day of the week. "Modern Perl" is the equivalent to Douglas Crockford's "JavaScript: The Good Parts". It is about avoiding the bad parts of the language and embracing the good parts.
Posted by: Robinsmidsrod | 10/08/2011 at 05:27 AM
@Ada - WWW::Mechanize is a module originated in Perl and ported to Ruby for example. I don't see any wrongs in porting good libraries between languages
Posted by: Account Deleted | 10/08/2011 at 06:58 AM
@oxtan C: nginx, Java: Solr, C++: MongoDB… just to name a few recent innovations for those languages that have become popular outside their respective communities.
@Tudor That module is 10 years old, that's before Perl was even considered dead, i asked for recent developments.
Posted by: Ada | 10/08/2011 at 12:41 PM
I don't remember Smalltalk inventing stateful, parametric traits, especially when I had the design for Perl 6 roles sketched out *before* the publication of that traits paper. (Ask Dr. Black about that sometime.)
You might also put TAP in the list of Perl inventions other languages have started to adopt.
Posted by: chromatic | 10/08/2011 at 02:19 PM
@chromatic I'm asking for recent innovations, not stuff that happened 10-20 years ago.
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.
Posted by: Ada | 10/08/2011 at 02:43 PM
@Ada - Saying that nginx is a C innovation is like saying that Facebook is a PHP innovation or that Twitter is a Ruby one.
Also, if you consider Perl dead because it does not add sufficient innovation, then how do you consider .NET? not even born yet?
Posted by: Account Deleted | 10/08/2011 at 03:46 PM
What a waste of time to argue with someone who unilaterally gets to dismiss anything interesting as "not innovative" and who is solely responsible for defining the terms "innovative" and "original" and "invented" and "factually".
(The intellectually honest of the world might suggest rather that other communities are 10 - 20 years *behind* Perl in adopting certain features. JavaScript's new strict mode comes to mind.)
Posted by: chromatic | 10/08/2011 at 05:08 PM
@Tudor Yes, i think those giant web services do qualify as a huge success for their respective programming languages, even though in the context of this blog post we are primarily talking about open source software projects.
And .Net is not a programming language but a runtime, and there are quite a few very innovative languages running on it, such as JavaScript and Ruby.
@chromatic So you pretty much agree that Perl has passed its prime and there has been no true innovation happening for 10-20 years?
Posted by: Ada | 10/08/2011 at 05:22 PM
believers believe, there is nothing mere mortals can do, except keep coding.
Posted by: Nyet | 10/08/2011 at 06:22 PM
if your language is best, why not spend your time coding in it rather than posting about how perl is dead?
Posted by: PerlDean | 10/08/2011 at 07:44 PM
MySQL HandlerSocket( https://github.com/ahiguti/HandlerSocket-Plugin-for-MySQL ) from DeNA.
DeNA(Japan's leading social games company which had acquired ngmoco recently) is a Perl shop.
(See http://www.slideshare.net/notolab/dena-loves-perl )
Perl is the dominant scripting language in Japan. ( http://yapcasia.org/2011/en/ )
They released HandlerSocket with C++ and Perl codes at first.
Now, It's been ported to many different language.
Posted by: Account Deleted | 10/08/2011 at 09:19 PM
If Perl's the language that everyone's actively working to port things to, that seems like a pretty good sign that its in high demand.
Posted by: Becker | 10/08/2011 at 09:33 PM
@PerlDean No idea why Perl people always get so defensive, if i asked a Ruby developer the exact same questions i would get a straight answer and not excuses.
@Becker Maybe, or maybe its a desparate attempt to stay relevant without doing real work. After all Perl itself has not even been ported to the JVM yet.
Posted by: Ada | 10/09/2011 at 12:23 AM
@Ada - I don't mind learning and using a 'dead' language like Perl. I am doing Perl for only a year, and it's fucking awesome - it is a hard to learn language having lots of traps, but I guess that is what will guarantee that salaries will not decrease to Perl programmers. Take a look at PHP - it is in high demand, but the market is full of shithead programmers. That is an easy to learn programming language, just like Ruby (although, ruby has some challenging constructs that might keep idiot developers away from it)
As long as in perl we have CPAN, perltesters, huge codebase in production, great frameworks and libraries (i don't care that most of them are inspired from other languages) and a vivid echosystem, I will use perl.
I am afraid that people call it dead, because they are not able to learn it and see its greatness and power. It is an old language indeed, but we have several releases/year - that alone means it is a live&kicking language.
If it is a dead language, why does most linux distributions come with it preinstalled and not with Python/Ruby/Java and why are the most sysadmin tools written in Perl and not ruby, or C/C++?
Posted by: Account Deleted | 10/09/2011 at 01:23 AM
@Ada
> What truly original ideas have originated from the Perl community in recent years?
libev
http://search.cpan.org/perldoc?libev
http://software.schmorp.de/pkg/libev.html
libev is made by Marc Lehmann ( http://search.cpan.org/~mlehmann/ ),Who is a guru of asynchronous Perl moudles.
Project using libev.
Innovative!! Node.js ( http://nodejs.org/ )
Python - Twistd ( http://twistedmatrix.com/trac/ )
Python - Gevent ( http://www.gevent.org/ )
Ruby - EventMachine ( http://rubyeventmachine.com/ )
Lighttpd ( http://www.lighttpd.net/ )
Posted by: Account Deleted | 10/09/2011 at 07:41 AM
@Ada: hi Ada, do you mind giving an example of what you consider innovative and modern in your language of choice? In my experience, it's extremely hard to come up with new and innovative things to do as most interesting things have been done (software developers are clever folk afterall). And there's nothing wrong with borrowing/stealing good ideas... ruby is afterall a clone of perl right ;)
Posted by: J1n3l0 | 10/09/2011 at 02:32 PM