by jamespwilliams · 3y ago · 0 comments
Yeah, because the ecosystem is dead. The flipside is that the bulk of Perl modules available are stale and don't receive any security updates or bug fixes. If I had a pound for every time I've seen a 10+ year old bug with no comments in the CPAN issue tracker...
> Perl has a small set of core syntax and is very extensible and flexible in adopting new paradigms.
Depends what you call "core syntax". The syntax available to you with a stock Perl install is certainly not small compared to other languages.
> With a great amount of discipline, Perl scripts can be successfully scaled up into large, complex systems.
If you're disciplined, you can write complex systems pretty much as well as you could in Python or any other dynamically-typed language.
However, it requires a lot of discipline and experience, and with other languages you at least have good formatters and LSPs to help with that. Perl sorely lacks this kind of infrastructure.
I also think the lack of static types makes writing complex systems massively harder, but that's not a criticism of Perl in particular.
Some of us would call that "mature" or "stable". You don't have to change the basics of the language every two weeks and have people rewrite everything every three weeks (when the three week old version gets removed from ubuntu).
Look at LaTeX for example... ever goddamn academic uses latex, but it hasn't really changed for many years now... is it dead? Of course not.
LaTeX is just packages (which do change, all the damn time, it's a curse) on top of Knuth's TeX. TeX, it's true, is feature frozen, Knuth has asked that when he dies the version is increased from a close approximation of Pi to Pi itself, and no further bugs are fixed. At that point TeX will be frozen solid, I'd be surprised if it lives another twenty to thirty years, its purpose is digital typesetting and er, you may not have noticed but we ain't printing so many books these days. Once we're not setting type anyway, TeX's purpose expires.
Knuth writes books. That's what TeX is for. If you write journal papers, eh, TeX is more likely to ensure you see in print what you intended, but increasingly Maths is done online in forums, nobody wants to wait six months to read a camera ready spell checked document - and meanwhile Unicode means squiggles are easier to write on a computer correctly, and programming means you can express what you meant in (terrible) Python instead of squiggles.
The Math professors at the University I work for do still write a lot of LaTeX (whereas in CS it's not so common as it was) but I wouldn't be surprised if an ordinary Maths undergrad can't write decent LaTeX today, so that's a smaller and ageing constituency.
I realize you're exaggerating and that you don't literally means 2 or 3 weeks, but I have Python programs I haven't touched in about 10 years that I still regularly use and that still work fine. Some of my oldest Go programs from over 7 years ago still work fine, and I'm pretty sure that if I were to try running some of my older Ruby or PHP programs (some of which is >10 years old) today it would still work either out of the box or with a few small changes (IIRC some of the defaults in PHP changed wrt. errors, so that might need a little bit of fiddling).
Even JavaScript – the poster child of "rewrite every 2 weeks" – is pretty compatible. You don't need to switch to $new_js_framework and many people use older stuff just fine. The language itself is pretty compatible (almost to a fault, arguably).
The way Py2to3 migration was handled was also some abomination. Meanwhile if I need my Perl code to work like old Perl I just write use v5.10 in header...
$ cat =latexmk | wc -l
10284
$ cat =latexmk | grep -v '^ *#' | grep -v '^ *$' | wc -l
5982
$
> to implement a basic build toolThis basic build tool comes with a man page that is 26.5 thousand words long. Not your typical basic build tool.
To be fair, the way the Perl 5 to Perl 6 migration was handled was worse. It got so bad that they ended up renaming Perl 6 to something else, after it had already been released under the Perl 6 name.
Here is one of the earliest announcements: https://www.perl.com/pub/2000/07/perl6.html/ .. some quotes:
> So the upward migration path from Perl 5 to Perl 6 will probably be to run your code through a translator.
> Larry promised not to abandon Perl 5. The 5.6 maintenance track will continue as planned, and the 5.7 development track will eventually yield Perl 5.8, as planned. 5.8 will be the final release of Perl 5, but it will continue to be maintained and stable.
perl is at 5.37 now... so much for "5.8 will be the final release" :) Also, this does sounds awfully like Python 2->3 migration.
That's common in all large active open source project though.. like Firefox, Android, etc...
Python is today's Perl. It ditched the philosophical sermons of simplicity, minimality and all that, for practicality almost 15 years back. Since then, Python 3, has not shown any reluctance to add new syntactical features and sugar. The ecosystem is large. The language is flexible enough today to give Perl like feels from the 1990s and 2000s. Python is no longer big in web dev thanks to React, and its back to being a backend glue language(Java being a language for serious backend enterprise work) with Perl like philosophical leanings.
As of today think of Python as a Perl with mandatory tab based formatting.
That’s true for any platform - Java or PHP. Perl has less support in modern IDE. Perl 5 to 6 transition failed many times so ecosystem lost many talents.
P.S. I wrote and supported large Perl codebases, no rocket science to manage it, if you do it right.
Is it?
(For Javascript, it would be several hundred pages per day - buts..lets not talk about JS).
Perl is an old geezer hacking out its dying last breaths. Calling it "stable" is fine. Death is a very stable state.
Back 15+ years ago, you'd see perhaps 2-3x more updates on CPAN recents per day than what's there today.
I'll always love Perl, but it's definitely on a long slow popular decline.
I get what you're saying, but also that's kind of BS at the same time. If you're thinking Python type annotations are a great feature, then you're entitled to your opinion. Others might say static typing of a dynamic language is pointless, and yet type analysis does help find bugs in code... to which I would agree. And yet the cost of adding static type annotations, which are not very static, causes the cognitive load to increase, and increases line-noise in a very ironic way given how Python was originally parroted as a less obscure script.
To that last point, let's not forget about sigils in Perl, and how they sorta are a form of type indicator. There is not much ambiguity when the script uses a symbol out in front of any given type of variable ref. The topic of tokenizing variables/ constants, lists, arrays, hashes, or whatever... entities in a script is an academic topic, but it's not! Just look at GOlang for example, they made a huge mistake by exporting variables and things by using the First character of the object, upper or lowercase determines if that thing is exported. One does not need to go find the declaration of the object to see if there was an "Exported" key word annotated at the definition, as is the custom in Python. But the problem is now the language relies on latin language concepts of upper/lower case characters... which excludes many large spoken & written languages used around the world. Thing any Asian, or middle eastern typeset. Anyhoo, Python got that right... one could in theory write python in one's own native spoken language, and Perl can be written in Klingon if you want... any arbitrary spoken language. One of the reasons is because the sigil's are separate from the typeset, and can be changed. In this way, and many other ways, the pathological pragmatism of Perl is outstanding, and the lack of weird opinions is both a strength and weakness. One last bit about typing, performance, and correctness.... Perl is very fast. I'm always reading how in Python the `for` loop is preferable to the `while` loop because one is implemented in python itself, and the other is a very optimal C code implementation. Perl is optimised at every corner of the language, except modules, but also modules who choose... Python does that too for modules, like any math or data-science stuff.
On that last point, I want to throw a bone, and 100% agree most of the Perl libraries for modern practices are out dated, or non-existent, or security problems. A programming language is only as useful as it could be for any given college student to use for a 1st-year software-engineering program. So if the ecosystem is dead, the language is pretty much dead. That said, I know plenty of neck beards who still use IRC, and bang out Perl for quick prototyping... before moving to GO, C, or whatever...