Comment by benreesman
3 years ago
God I must have written 200k lines of Perl5, and I hate it as only an experienced user can.
But the fact is: it gets shit done. It’s pretty good at dealing with strings and byte sequences, and even more importantly, it’s always fucking installed,
The “best” software helps you nothing if you’re machine isn’t running it.
> It’s pretty good at dealing with strings and byte sequences,
Ugh. Close to half the bugs I’ve chased in Perl in the last 10 years are encode/decode string bugs (or more specifically, the lack of doing encode/decode where necessary). After just one ‘downgrade_utf8()’ use, you get sick of Perl pretty fast.
This to me is where Perl ends up super short.
Basically try using it outside of the anglosphere in the world of Unicode and support falls apart. Sure is excellent if you need to do something like extract a bunch of 1980s database files encoded in LATIN-1 though!
> Sure is excellent if you need to do something like extract a bunch of 1980s database files encoded in LATIN-1 though
Or, y'know, a bunch of 2010s database files encoded in latin1. Fun fact: Did you know that MySQL 5.7 is still a supported version in 2022?
If you don’t (need to) care about Unicode, maybe. If you think pythons package management is not disastrous enough, maybe. If you do not (need to) consider Windows, maybe.
Even then, I’d rather choose Python.
> If you don’t (need to) care about Unicode, maybe
Perl has had strong unicode support since Perl v5.12 (~2010).
references: 1. http://xahlee.info/perl/perl_unicode.html 2. https://stackoverflow.com/a/6163129/12458
> If you think pythons package management is not disastrous enough, maybe.
Huh? I've used PAR::Packer with great success since 2005.
> If you do not (need to) consider Windows, maybe.
Microsoft used to ship Perl scripts to work with COM and WMI with their NT4 and Windows 2000 resource kits. Perl works *extremely* well with Windows.
I mean, there are lots of reasons to choose Python over Perl, but IMHO, these are not those reasons.
I use Perl as a better-bash. If I was writing a modern website, a large application, or any ML related work...I'd choose Python. But for complex system administration, I'm picking Perl. YMMV