Comment by kqr
2 days ago
A lot of people in this thread speculate that Raku (formerly "Perl 6") killed Perl. But I have yet to see convincing first hand accounts confirming that.
I certainly don't believe it. Everyone I talked to at the time who worked with Perl knew it would not go away: humanity had chained too much of the infrastructure of the internet to it. Someone would have to maintain it for many years to come, even if Larry's new experiment became a wild success. (Already back then people seemed skeptical of the experiment and hung back with Perl 5 waiting to see what came out of it before paying too much attention.)
I still struggle to understand why Perl went out of favour[1] but I think what another commenter wrote here might come close: for Unixy folks who know shell, C, awk, sed, Vim, etc. Perl is a natural extension. Then came a generation of programmers brought up on ... I don't know, Visual Basic and Java? and these were more attracted to something like Python, which then became popular enough to become the next generation's first language.
[1]: As someone who knows me might understand: https://entropicthoughts.com/why-perl
> Everyone I talked to at the time who worked with Perl knew it would not go away
But what about people who didn't work with Perl, or only used it as a side thing? I know I personally put off deepening my superficial knowledge of Perl 5 in the early 2000's, in anticipation of "Perl 6". The Osbourne Effect is a real thing.
EDIT Or, companies starting major new projects, and deciding what language to write it in? It's one thing to say, "Perl 5 will be supported for a long time, we don't need to migrate our existing projects off it." It's another thing to say, "We want to start a new project; should we start it in Perl 5, which will become 'legacy' in a year or two when Perl 6 comes out? Or should we write it in Python?"
https://en.wikipedia.org/wiki/Osborne_effect
There were many daggers making the Perl Community bleed:
1. Enterprise Development
Java et Al led to a generation of developers working further from the kernel and the shell. Professionalization of the field led to increased specialization, and most developers had less to do with deployment and management of running software.
Tools also got much better, requiring less glue and shifting the glue layer to configs or platform specific languages.
Later on, DevOps came for the SysAdmins, and there's just much less space for Perl in the cloud.
2. The rise of Python
I would put this down mostly to universities. Perl is very expressive by design, in Python there's supposedly only "one right way to do it". Imagine you're a TA grading a hundred code submissions; in Python, everyone probably die it in one of three ways, in Perl the possibilities are endless. Perl is a language for writing, not reading.
3. Cybersecurity became a thing
Again, this goes back to readability and testability. Requirements for security started becoming a thing, and Perl was not designed with that in mind.
4. The Web was lost to Rails, PHP, then SPAs
I'm less clear on the why of that, but Perl just wasn't able to compete against newer web technologies.
You could write good-quality secure code in Perl, but the level of dynamism in the implementation and the fact that there’s only the one main implementation means there’s not much hope of quality static analysis.
I agree with "for Unixy folks who know shell, C, awk, sed, Vim, etc. Perl is a natural extension. Then came a generation of programmers brought up on ... I don't know, Visual Basic and Java? and these were more attracted to something like Python.".
I believe this, too.
I do not use Python. I would rather use Perl (!), Tcl, Lua (!), Go (!), C (!), OCaml, Erlang / Elixir, and Factor / Forth, and very rarely Common Lisp (SBCL). I do not like Java / Kotlin and related languages. That said, I started with shell scripts, and then probably a little bit of Perl and Tcl, and very often C because back when I was a kid I was modding ioquake3 forks that are written in C.
As someone who shifted from a lot of perl to a lot of python in the early 2000s, it was because the same shortcuts that made perl really great for system "archaeo-devops" scripting made it difficult to read others' code and to write anything larger than a couple of files. I still use grep, awk, sed, cut etc etc a ton, just not perl.
I wouldn't say I was brought up on Visual Basic though. It was not a language that taught structured programming at all.
Better/less worse AND more accessible languages killed Perl. And I say that as someone who knows POSIX sh/awk/sed pretty well; which means using them in constant disgust of the ubiquitous UNIX braindamage.
It's not without reasons that the UNIX guys did Plan 9 afterwards, let me tell you.
"Looking like sh/awk/sed" is not the big win Perl evangelists thought it was. Quite the opposite!
People who have actually used sh/awk/sed know quite well how terrible they are.
I remember Perl evangelists bragging about "associative arrays" as if they were God's Gift to Humanity that no other language could touch, only because they knew no other language. Not even realizing how much more limited Perl's associative arrays were because of its complete lack of reasonable reference semantics.
> Everyone I talked to at the time who worked with Perl knew it would not go away
And they were wrong. Perl went away a long time ago.
Not true. I'm sure Perl is one of the most widely installed languages in the world, by virtue of (still!) being a system component in various unices. (Maybe even macOS?)
Even C++ people seemed to favor Python, because of its similar object model.