Live data from Hacker News

Why Perl isn't Going Away Soon (Or Ever)

ostatic.com

51–60 of 88 posts

Re: Why Perl isn't Going Away Soon (Or Ever)

#51
post #41

Earlier quoted context omitted.

"What you've asked is essentially like asking "How does mortar hold buildings together any more than bricks, steel I-beams, or roofing?" Argument by metaphor is a lazy device. I don't see any specific "mortar like" virtues that perl has but other common scripting languages don't. In this metaphor I guess C Code would be the "bricks and steel beams". Why can't I put a unix box together without perl on it? Is there any…

The phrase "Perl holds the internet together" was coined by analogy with Perl's widespread use as a glue language. You've interpreted it too literally. It doesn't mean that you can't set up a router or another piece of Internet infrastructure without using Perl. It means that Perl is used in a lot of unexpected places, and that a lot of critical things are "held together" by Perl. Even if you think your website is ru…

"It means that Perl is used in a lot of unexpected places, and that a lot of critical things are "held together" by Perl. Even if you think your website is running on Java, some systems administrator probably has a cronjob written in Perl critical to its operation."

In the above sentence replace Perl with C/C++/awk/lua/Python/Ruby/almost-any-language and it makes as much sense. Which is probably another indicator that there is nothing particularly perl specific about "holding together the internet". If anything "holds together the internet" it is the (language independent) protocols that do it.

Re: Why Perl isn't Going Away Soon (Or Ever)

#52
post #9

The whole article fails to mention any advantage of Perl over the languages it's compared to (wonder why). The sooner Perl falls into obscurity, the better.

I currently code for my day job in a proprietary extension to a proprietary dialect of BASIC from the mid-80's. This language is legitimately broken, and has significant disadvantages at every turn. It has no real functions, no block-level scoping, lists are stored as delimited strings, there are no hashes, and nothing even resembling objects. Perl has all of these things. If you're coding in Perl and you write bad c…

But that's because you already know perl. For new people... I don't see a reason to go there. Perl smells funny - there are better alternatives that don't require you to spend time learning (for example) what can be referenced, what cannot, when is \ not taking a reference, why I cannot have lists-inside-lists, and how is that different from arrays anyway, etc. And that's only one source of that funny smell... For beginners, there are loads of languages which offer consistent behaviour and once they learn that, perl will be the odd one you don't really want to touch.

So yes - some people will still write perl, but it will be an obscure language one day (hopefully).

Re: Why Perl isn't Going Away Soon (Or Ever)

#53
post #49
post #45

Earlier quoted context omitted.

ease of writing shitty code, mountains of shitty sample code, and a community which did not vehemently encourage the writing of unshitty code. This caused a backlash which lasted several years, during which the programming public panned the languages almost universally. That's not how I remember it. Perl usage started to really fall off when PHP became popular and replaced modperl/ cgi scripts as the common way of th…

Perl usage on the web began to fall off due in part to PHP, but you're neglecting the huge amount of Perl used in text processing, system administration, automation, even the sciences. PHP is (very mildly) comparable to Perl's Mason template engine, if Mason were the only way to use Perl.

you're neglecting the huge amount of Perl used in text processing, system administration, automation, even the sciences

Are you saying that perl usage had started to fall off in these areas before it lost its crown as the lingua franca of the web? Possible, but again that is not how I remember it rolling out.

Re: Why Perl isn't Going Away Soon (Or Ever)

#54
post #24

Earlier quoted context omitted.

I currently code for my day job in a proprietary extension to a proprietary dialect of BASIC from the mid-80's. This language is legitimately broken, and has significant disadvantages at every turn. It has no real functions, no block-level scoping, lists are stored as delimited strings, there are no hashes, and nothing even resembling objects. Perl has all of these things. If you're coding in Perl and you write bad c…

It's all fine until you have to work with bad legacy code ;) My last project at work was rewriting a 4k line monstrosity in Perl into 500 lines of Python which do exactly the same. I can't even blame the original authors (it was likely their first larger program), it's just that Perl makes it so easy to write horrible code.

Why can't you blame the original author since you know it was likely his first larger program?

I know that Perl's defaults (mainly lack of strict and warnings) can make it easy to write code that easily breaks or has bugs or is harder to maintain, but it is the first time I hear the argument that it make it any easier or encourage someone to write 4k lines when he could have written 500 lines.

I would guess that guy would have created a 4k monstrosity in Python if that's what he had to use without having enough experience.

Or maybe I am not being imaginative enough? Can you give examples from the program you rewrote where Perl encourage beginners to write "huge monstrosities" while Python would have encouraged them to write succinct code ?

Re: Why Perl isn't Going Away Soon (Or Ever)

#55
post #50

Earlier quoted context omitted.

"Perl development is picking up and enthusiasm for Perl 5 is as strong as ever." I will take your word for it, but I do have to say (speaking as someone with a lot of grey in his hair) that I haven't seen a young developer choose to work primarily in perl (over ruby or Python or Java or C#) in ages. Most new projects/startups don't seem to choose perl as their primary language. I readily concede that this is probably…

Older people use it is because they don't want to change or learn something new. Especially in a company already entrenched in Perl development, their is little benefit to switching to a better language compared to the cost of forcing people to learn a whole new technology stack when they are more than content with Perl. However, new companies are much more free to build on whatever technology stack is most appropria…

I disagree with your implication that Perl is suitable for newbs but should be discarded for "better languages" by people who are interested in learning.

In fact I would invert your statement: I think Perl is not a good choice for people without good programming habits, but for those who know how to use it, it offers more power of expression than most of its peers.

(Also, datum: count me in as an "older person" preferring Perl for most tasks despite knowing Ruby, Python, JS and half a dozen other languages.)

Re: Why Perl isn't Going Away Soon (Or Ever)

#56
post #39

Earlier quoted context omitted.

To answer your specific question, it isn't necessary. It's just another Turing-Complete language, right? Perl was one of the first popular scripting languages out there to have well-integrated regex handling and was useful for programming purposes. Most old-school systems and network people not only know how to code their way out of a paper bag, but typically grew up with C and Perl as their two go-to languages. C wh…

" Most old-school systems and network people not only know how to code their way out of a paper bag, but typically grew up with C and Perl as their two go-to languages." Which is probably why the "new school" systems programmers (many of whom also know how to program their way out of all kinds of bags) choose other scripting languages to go with C. They don't need to know perl any longer for all the tasks you laid ou…

many of the "old school" also knew their way out of all kinds of bag and choose perl. Nobody needs to know (pick your language) but knowing perl has really helped me out in my long career in programming. You seem to be of the kind that does not like perl so are looking for the future where no one uses it . If you think COBOL is only used in legacy code bases, every time you search for a hotel or Air tickets you are most probably interacting with a main frame system

Re: Why Perl isn't Going Away Soon (Or Ever)

#57
post #38
post #35

Earlier quoted context omitted.

Perhaps it's not as popular because it doesn't have One True Web Framework, which is what the young'uns use these days, right? I know Catalyst and Mason are both very nice frameworks, but they don't come rolled with a base Perl installation.

Rails is the main driver behind Ruby's success, true. And it really is a nice framework. However, Rails doesn't come rolled with a standard Ruby installation either, and 'gem install rails' is no easier or harder than 'cpan -i Catalyst::Devel'. Interestingly, I notice many of the new Rails 3.0 features -- most notably composable set algebra and increased modularity -- are features which drew me to Catalyst+DBIx::Clas…

'gem install rails' is no easier or harder than 'cpan -i Catalyst::Devel'

...Perhaps from your perspective.

Re: Why Perl isn't Going Away Soon (Or Ever)

#58
post #44
post #33

Earlier quoted context omitted.

Thanks for the update. I stopped using perl around the same time 5.8 was slated to be the last version of perl 5, since perl 6 was coming Real Soon Now. I learned perl in 1996 in order to cobble together a system that collected reports from all sorts of weird text files and formats (anyone remember Framemaker?) and merge them into one nice big postscript file with custom watermarks and page numbers. This program ran…

Did somebody really say "Perl 6 is coming real soon now?" I have only ever seen "by christmas" and they don't mention what year.

According to http://use.perl.org/~pmichaud/journal/39411 (written last summer) this Spring (likely April) is targeted for a production release of a usable subset of Perl 6. The same information is posted to http://www.perlfoundation.org/perl6/index.cgi?Rakudo_Star.

They obviously didn't make that. I don't know what the current state is or what the exact thinking is now.

Re: Why Perl isn't Going Away Soon (Or Ever)

#59
post #55
post #50

Earlier quoted context omitted.

Older people use it is because they don't want to change or learn something new. Especially in a company already entrenched in Perl development, their is little benefit to switching to a better language compared to the cost of forcing people to learn a whole new technology stack when they are more than content with Perl. However, new companies are much more free to build on whatever technology stack is most appropria…

I disagree with your implication that Perl is suitable for newbs but should be discarded for "better languages" by people who are interested in learning. In fact I would invert your statement: I think Perl is not a good choice for people without good programming habits, but for those who know how to use it, it offers more power of expression than most of its peers. (Also, datum: count me in as an "older person" prefe…

I never meant to imply that Perl is suitable for newbs, but rather most scripting languages are. I would much rather newbs learn another language, in fact. I changed my wording in my original post to reflect that.

Also, for my background, I learned Perl as my first scripting language and after writing a ~1k line code project in it, decided that for anything over 200 lines I would rather use Java. Later when I learned Python I was vindicated in that almost everything I instinctively disliked about Perl was absent in Python. Since then I have learned many other languages as well, and I also know Perl the language better than most of my co-workers

Re: Why Perl isn't Going Away Soon (Or Ever)

#60
post #39

Earlier quoted context omitted.

To answer your specific question, it isn't necessary. It's just another Turing-Complete language, right? Perl was one of the first popular scripting languages out there to have well-integrated regex handling and was useful for programming purposes. Most old-school systems and network people not only know how to code their way out of a paper bag, but typically grew up with C and Perl as their two go-to languages. C wh…

" Most old-school systems and network people not only know how to code their way out of a paper bag, but typically grew up with C and Perl as their two go-to languages." Which is probably why the "new school" systems programmers (many of whom also know how to program their way out of all kinds of bags) choose other scripting languages to go with C. They don't need to know perl any longer for all the tasks you laid ou…

Trends are funny, and don't only go in one direction. According to the admittedly flawed TIOBE index (see http://www.tiobe.com/index.php/content/paperinfo/tpci/index.... for verification), in the last year PHP, Python, and Ruby have all fallen, while Perl has increased.

Yeah, not what I would expect either. But Perl isn't as dead as people claim.

Post reply on HN