Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine

Re: Perl is dying

by thraxil (Prior)
on Jul 17, 2006 at 01:53 UTC ( #561632=note: print w/replies, xml ) Need Help??

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:

  • CPAN - CPAN still kicks everyone's ass as a centralized repository of modules for doing everything and more. It was the first thing I really missed from Perl. However, in the last three years or so I really haven't run into much in Python that I thought there should be a library for that there wasn't already one for that was easily findable with google. With the Python Cheese Shop It looks like the Python community's determined to catch up. And easy_install even lets me do the same trick with downloading and installing a module by name from the commandline.
  • Text Processing - No doubt about it, Python's regular expression library is more tedious to use than Perl and no one in the Python community seemed to really care. Eventually though, I realized that Python had a very powerful built in string class and all the common things that I used to do with regexps in Perl I could do directly and more clearly with Python strings. It took some getting used to, but now I do fairly heavy text processing and barely ever use regexps. (Which is not to say that I don't still drool slightly at Perl 6 regexps (I don't use regexps much anymore, but they're still cool as hell)).
  • mod_perl - mod_python is good and improving all the time, but it's still rough around the edges compared to mod_perl. The rough transition that mod_perl had to make between apache1 and apache2 kind of leveled the playing field though. Nowadays I use TurboGears and Plone though and am much happier for it.
  • DBI - DBI is more consistent, polished, full-featured and better documented than Python's equivalent database API. Once I discovered the SQLObject ORM though and let it hide the crufty bits, it ceased to matter.
  • Perlmonks - There's just no other community like it in any language that I've found :(

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.

Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://561632]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (None)
    As of 2021-10-20 02:03 GMT
    Find Nodes?
      Voting Booth?
      My first memorable Perl project was:

      Results (78 votes). Check out past polls.