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