http://www.perlmonks.org?node_id=11124890

Dear fellow monks,

This is an opinion piece, flames > /dev/null please.

As this crazy year approaches it’s culmination, I would like to reflect on why I still choose Perl (and C) for most, if not all, of MY work. Disclosure: I make a living with Java, Docker, AWS and a lot of tools considered “mainstream”, but I do this because companies are already biased towards what’s popular, not necessarily what’s best. And they pay good money to continue with their suffering.

In my personal endeavours however, I rarely leave the ecosystem of Perl, C, FreeBSD, and PostgreSQL. It’s a sharp contrast to today’s virtualized and SaaS world, and I wonder how these companies are so stupidly herded into working like this. I mean, back in 2006, I was creating Web Services on mod_perl2 that were hitting 6.5K TPS on a single node and I was deploying with FreeBSD Jails, almost identical to what people are doing today with Terraform and Docker, albeit, at a micro fraction of the cost. Today, the best stuff I see with the container-micro-services-mania, is a few hundred TPS at best, and extremely costly and complex. People are probably spending 100x as much as they would have spent, using bare metal and real people.I mean real programmers and sys admins who actually knew what they were doing to fine tune a real architecture.

Something smells really bad.

Sure, the modern environments shiny, somewhat convenient and hip, with SaaS or GUIs for most everything. But it’s costly and stupid. My guess is that companies will start to wake up one day, like from a bad hangover and say: W.T.F. are we doing? And it’s not just AWS, but to me the whole toolchain is broken and just crazy. The amount of waste is just horrendous and unsustainable. Just how many layers of shit are we going to continue to pile up until we realize something smells really, really bad.

Same thing with programming languages. The Java world is honestly laughable, nobody really knows what Java is anymore (most everything relatively useful and “modern” in Java is based on bending the language with generics!), and “portability” is a widely disproven myth. Then you have the plethora of new and hip languages and frameworks and the young coders who think just because Google or Facebook backed it, It must be good. Guess what, most companies are not Google or FB.

But when Netflix wakes up and rewrites their CDN on bare metal with FreeBSD it hardly makes the news.

So back to Why Perl in 2020...

Well first, we finally got rid of the Rakudo shadow(see Note 1 below) Raku and Perl languages were finally separated, lifting the long cast shadow of "Perl 6" on Perl, and Perl 7 is now on it’s way!

I can’t believe we didn’t see this textbook example on how to kill a good existing product: advertise the new one is coming, before it’s even born. There are so many examples in history, of organizations shooting themselves in the foot this way, it’s even stupid. And yet, we did exactly that. The way Perl 6 was managed was really destructive to our beloved language, and our community. Yet here we are. We survived, we are tired and demoralized, yes. But I truly think we can finally start to heal and oxygenate the ecosystem with the coming of Perl 7.

It’s time for a new dawn of The Programming Republic of Perl. Yes, we have lost a few battles, but this is a long term stamina race, not a short term sprint. There is a new saying amongst investors these days: the age of the Unicorns is over, it is now the age of the Camel. I think we should take this one home.

So why Perl in 2020, or 2050 or 3020? Simple: Perl is probably the most malleable language on the planet. I don’t think people realize it, and truly understand the value of this. IMHO, it’s the one thing that no other language can really come close to Perl.

You can start Perl project as a one-off script and then refactor it all the way up to complete Object Model like Moose (contrary to the half-baked Java OM), or you can go the Functional route, or better yet, use both. You can evolve your code using different paradigms and different frameworks (all staying within the same CPAN ecosystem) to address different problems you will encounter along the way. You can hammer out performance bottlenecks over time, even refactor some portions to C, easily! You start out with a simple script and wind up refactoring portions to different frameworks such as POE, Catalyst, Mojolicious, Dancer, etc.

Mojolicioius itself is based on the same principles (start simple, grow and refactor as you need), which is actually a unique feature of the Perl language itself.

There is a plethora of other great tools and frameworks in the ecosystem, for every taste, and you can use the same language for your complete toolchain including operations and sys admin. I mean, how cool is that?

The widespread rumor that that Perl is a write-once language is such bullshit, that people who spread it must have never actually done anything in Perl and probably in any other language, or in their miserable lives for that matter. This unfounded myth cannot be farther from the truth. I have taken all kinds of legacy Perl and slowly transition it to modernize it, or to change it’s structure completely in incremental and iterative phases along the way. All other lagunages I’ve worked with, would require complete re-writes, but not with Perl. With Perl you can gradually transition and solve specific issues you find along the way.

There is no such thing as unreadable Perl. It’s only unreadable if you are ignorant, and as such any language that is not “ for dummies” will not appeal to you. Go code in Python and be happy, but don’t trash talk Perl just because you don’t get it. Perl is for the artists, the coders that truly want to express themselves in the code itself, to make the code beautiful to them, not to anyone else or some academic fool. Perl can create beautiful code that may look ugly to someone else, that’s perfectly fine. Such is art, and programming is an art, no matter how hard we try to define it in any other way.

I haven’t seen much talk about this malleability of Perl, which to me, is frankly unique. I don’t have the academic background in computer languages to formally describe why this is so, but I do have the experience. That is over 30 years of it; not only with Perl, but with MANY other languages. I know what I’m saying is a matter of fact, but I cannot formally describe it or prove it formally. I believe this is a topic that should be studied and formally described, and it’s something that could surely help put Perl back in the place where it belongs: which like C, it’s probably almost the perfect General purpose language.

Today’s startup world is fast paced and very dynamic. Product requirements evolve in real time with actual product usage and software needs to adapt at lighting speed. When I see companies struggling every day with even the simplest of problems, I cannot believe they are not exploiting these capabilities of Perl.

Happy holidays and may the next year bring you all the best!!

Alex

Notes and Errata

Note 1: The original phrase was offensive to Rakudo which was not the intent. Please refer to commentary below for details and clarification.

Note 2: It is worthwhile to read the comments and replies, especially the the deeper nodes because there is A LOT to learn, A LOT MORE than in my OP. It made me realize there is much more to the Perl 6 story than meets the eye. For example, that early on there was mention to the second-system effect and the Apocalypse, "Second System Syndrome Done Right." , etc. There is also mention on the Three Tales of Second System Syndrome where PHP and Python went through similar processes. So please read the full commentary and deeper nodes for wonderful gems of wisdom, from our much wiser fellow monks.