Beefy Boxes and Bandwidth Generously Provided by pair Networks RobOMonk
Keep It Simple, Stupid

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...)

Comment on Re: Perl is dying
Re^2: Perl is dying
by ForgotPasswordAgain (Deacon) 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? :)



Log In?

What's my password?
Create A New User
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?
As of 2014-03-13 18:34 GMT
Find Nodes?
    Voting Booth?

    Have you used a cryptocurrency?

    Results (288 votes), past polls