http://qs321.pair.com?node_id=561632


in reply to Perl is dying

I don't know that Perl is dying, but there is an exodus going on. I will offer myself up as a data point.

I used to be a serious Perl programmer. I spent about 5 years coding almost exclusively in Perl and only occasionally sticking my head up to play with other languages. It was a hell of a lot better than Java, which those around me were using and I could crank out applications with more features and better performance in less time than they could without breaking a sweat.

A couple years back, I got called upon to take over a project that had been started in Python. I wasn't too excited about coding in Python but hey, at least it wasn't Java.

It took me about an afternoon to go through Dive Into Python and basically get to where the syntax of the language didn't get in my way too much. Then there was about a week of frequently looking up the things I wasn't quite sure how to do in Python (mostly library, not syntax related). It also took a little while before I'd broken myself of always putting curly braces around things, $'s in front of variable names and semicolon's at the end of every line.

At first of course, I despised the whole whitespace thing and I felt really unproductive overall. After a couple weeks though, a funny thing happened and I noticed that I'd gone from thinking significant whitespace was the worst idea ever to not noticing it at all to actually appreciating how simple it made things (at least once I'd gotten emacs configured right). I also noticed that within the domain that I was working (a GUI app for scientific simulation), I was now feeling at least as productive as I'd ever been in Perl. A little longer spent in Python-land exploring more libraries (for web stuff, database stuff, XML manipulation, etc.) and I started looking for ways to replace our Perl applications with Python.

What really got me was the simple elegance of the language. After a week or so I'd basically learned by heart every single aspect of Python syntax without really trying. Five years of coding Perl, hanging out on Perlmonks, reading perldoc and O'Reilly books and I'd never quite felt like I knew more than a small subset of the language. All of Python could fit in my head at once and I could just program without having to think about the language at all. Everything was simple, consistent, and as clear and explicit as possible without straying into verbose.

I've never quite bought the "Perl is a write-only language" argument (I'm still maintaining five or six year old Perl code at work that we haven't replaced yet because the applications were too big and I never have problems reading the old Perl despite the fact that I barely touch Perl any more) but that ability of Python to get out of the way of coding in a way that Perl never could for me was a pretty significant reason that I've moved on from Perl and have no desire to go back. Perhaps other programmers have more room in their brain for language syntax and can work with Perl the way that I can with Python. If that's you, more power to you. I'm just not that talented.

Here are the things about Perl that have tempted me to return:

I really have nothing against Perl; I still think it's one of the better languages out there and I sure as hell learned a lot in my years working with it. And I don't think that it's dying or stagnating; There are just too many people with too much Perl experience and too many lines of production Perl code for that to happen anytime soon. I'm just trying to give you one single data point for why a programmer might be inclined to move along to something else. I'm also not particularly attached to Python. It's treated me well, but I'm a disloyal bastard at heart and I'll happily jump to another language when it makes sense for me (Erlang, I'm looking at you...)

Replies are listed 'Best First'.
Re^2: Perl is dying
by ForgotPasswordAgain (Priest) on Jul 17, 2006 at 15:58 UTC

    From a quick look at your webpage, it looks like you've been out of school for five years, so your five years of coding Perl have been since getting out of school. Do you think the ease with which you're picking up Python could be that you're now more experienced with computer languages in general? Or could it be similar to the urge to rewrite code that people have, but in this case you're kind of rewriting the whole language that you're using. The grass is always greener on the other side.

    By the way, if you like simple syntax, why aren't you programming in Lisp? :)

      I was writing a lot of Perl while I was in school. Yes, part of the reason that I picked up Python quickly was that I was a more experienced programmer. Still, since I learned Python, I've had to occasionally go back to Perl for weeks or months at a time to work on old code and it's never gotten as comfortable as Python. If the ease of learning a language was only (or even mostly) dependent on the experience of the programmer (as you seem to suggest), I should have been able to go back to Perl and be even more proficient in it than I was in Python since I then had even more experience.

      I love Lisp, but every time I've attempted to use it for something non-trivial, I hit a wall usually involving libraries and cross-platform issues. Eg, last time I attempted to write a blogging engine in Lisp, I never managed to get an ORM library, a webserver, and a templating library all installed and running at the same time in the same lisp interpreter. One or the other seemed to have issues with SBCL, Clisp, or Allegro that I wasn't able to debug. But I keep trying once a year or so and each time I make it a little farther. So maybe next time. In the meantime, I do write a lot of emacs lisp and it makes me happy.