Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

When we did web development in 1996 it was CGI, FCGI and Perl on the backend. Now why is Perl not that popular anymore and instead we use Java, Python, Go, PHP, C# and everything but Perl? To me it seems that Perl should be good since it has had long time to mature. What happened that causes Perl to lose its applicability as server language?

share|improve this question
1  
If "long time to mature" was what mattered, we'd all be coding in COBOL. –  Steven Burnap Aug 24 '13 at 16:57
3  
Because Perl was written by a crazy person –  aaronman Aug 24 '13 at 16:58
2  
Because since the 90s, the discipline of computer programming has matured a bit, and people have gained a better understanding of the importance of readability. This has led to messy languages like Perl and C++ falling into disfavor. –  Mason Wheeler Aug 24 '13 at 17:01
2  
Also, your premise is a bit flawed. Java, Python and PHP are all around 20 years old, while C# is over 10. All four are quite mature. Go is not mature, but is only popular in the sense that many people are intrigued by it. It's not yet a common language in production. –  Steven Burnap Aug 24 '13 at 17:10
1  
To answer the new question - it's not that perl is outdated, but cgi and fast cgi are outdated models. –  MichaelT Aug 25 '13 at 14:08
show 1 more comment

closed as primarily opinion-based by Glenn Nelson, gnat, GlenH7, Euphoric, Kilian Foth Aug 24 '13 at 19:49

Many good questions generate some degree of opinion based on expert experience, but answers to this question will tend to be almost entirely based on opinions, rather than facts, references, or specific expertise.If this question can be reworded to fit the rules in the help center, please edit the question.

2 Answers

The model for web programming in the 90's was to launch an application that used the common gateway interface to launch another process that was forked by the web server.

Forking a process is a rather heavy weight operation. For perl, this means spinning up the interpreter, running it, and then letting the process terminate. When working with heavy loads, this became prohibitively expensive (memory and cpu).

FastCGI reduced the overhead of CGIs by reusing the process, cutting back on the heavy forking of a process. This is more inline with application servers, which leads us to...

The development approach today is to have an application server in a language that has a light weight process threading model, which can handle very large loads (compared to the days of CGI). Of these you have Java, Go, and C# which follow this approach.

This doesn't mean perl is out. There are application servers for Perl. One rarely hears of Catalyst compared to things such as Zope, NodeJS, or the plethora of Java App servers.

Part of this is timing. While the development of Java application servers was going on, Perl has been a bit bogged down with work on perl 6 (any day year now) and so the community as a whole let that development path slip by.

I personally discount the discipline of languages as a reason that perl has missed out pointing to javascript, php and ruby as three examples of similarly undisciplined languages that remain popular in the web area.

Languages such as Java and C# (and to an extent, python) with major company backing (Sun/Oracle, Microsoft, Google) and, yes, more discipline in the language are more appealing to enterprise development.

share|improve this answer
add comment

For the same reasons that everybody is writing everything in Java, Python, PHP, and C#... you use the right tool for the job at hand.

Perl really can do anything that you need it to. I mean, Movable Type and Markdown are both widely used pieces of software that are written in Perl, and they are completely different.

The reasons some people don't use Perl are mainly subjective (ugly code, difficult to learn, etc.) but you can say that about any language.

share|improve this answer
1  
I can't confirm ugly code, difficult to learn at least for Cobol, C and the 370-, Z80- and CDC-Assembler language. –  ott-- Aug 24 '13 at 18:53
    
@ott-- That was interesting, can you elaborate? My colleague next door was a 100 % Cobol programmer. I like C, Java is too large. –  909 Niklas Aug 25 '13 at 13:04
add comment

Not the answer you're looking for? Browse other questions tagged or ask your own question.