←back to thread

Perl's decline was cultural

(www.beatworm.co.uk)
393 points todsacerdoti | 1 comments | | HN request time: 0.192s | source
Show context
jordanb ◴[] No.46175337[source]
I always found the Perl "community" to be really off-putting with all the monk and wizard nonsense. Then there was the whole one-liner thing that was all about being clever and obscure. Everything about Python came off as being much more serious and normal for a young nerd who wasn't a theater kid.
replies(21): >>46175493 #>>46175513 #>>46175630 #>>46175714 #>>46175715 #>>46175932 #>>46176421 #>>46176502 #>>46176561 #>>46176760 #>>46176895 #>>46177183 #>>46177249 #>>46177277 #>>46178169 #>>46179976 #>>46180300 #>>46180433 #>>46180626 #>>46182489 #>>46197026 #
pavel_lishin ◴[] No.46175630[source]
I'm having to pick up some perl now, and while I don't interact with the community, it surely _feels_ like it was written by wizards, for wizards. Obscure, non-intuitive oneliners, syntax that feels like it was intentionally written to be complicated, and a few other things that feel impossible to understand without reading the docs. (Before everyone jumps on me - yes, as a developer, I should be able to read documentation. And I did. But until I did so, what the code was doing was completely opaque to me. That feels like bad language design.)

Some of it I recognize as being an artefact of the time, when conciseness really mattered. But it's still obnoxious in 2025.

The whole thing reminds me of D&D, which is full of classes & spells that only exist in modern D&D because of One Guy who happened to be at the table with Gygax, who really wanted to be a wuxia guy he saw in a movie, or because he really wanted a spell to be applicable for that one night at the table, and now it's hard-coded into the game.

replies(10): >>46175952 #>>46175994 #>>46176043 #>>46176170 #>>46176215 #>>46179499 #>>46180661 #>>46180866 #>>46184592 #>>46208093 #
tasty_freeze ◴[] No.46176170[source]
It isn't bad language design that you need to study the language before you can use it. I look at haskell programs and it looks mysterious to me because I haven't spent any time studying it, but I'd not thing to say it is bad language design.

Yes, one can write obscure perl code and some love perl golfing. In the same way there is an IOCCC which delights in unreadable code, it doesn't mean that the C language should be relegated to the dustbin. The answer is to write readable code, no matter which language is in use.

replies(3): >>46176228 #>>46176348 #>>46179783 #
pavel_lishin ◴[] No.46176348[source]
But I can look at most Python code and be able to understand what it does. With perl, I have to look up so much.

- Why is there a `1;` on a single line in the middle of this file?

- What is `$_`?

- This parallel execution manager doesn't actually seem to define what code needs to run in parallel in any specific way, how does this work?

- What is this BEGIN block at the start of this Perl file? Why is that necessary?

- What's going on with qx, qw, qq?

- What does chomp do when it's just on its own line, with no arguments given to it?

replies(6): >>46176524 #>>46176543 #>>46176615 #>>46176802 #>>46178354 #>>46179799 #
tasty_freeze ◴[] No.46176524[source]
Again: python syntax is more akin to what you are used to, and so it feels more comfortable to you.

$_ is inscrutable if you haven't studied perl, but the same thing would happen to anyone who sees a python decorator for the first time. what does "else: do after a while loop in python? Only people who know python know what it does (and I suspect most don't). The different quoting operators are also trivial to learn. In comparison, yield from python is also simple syntax but the semantics are much more involved.

BEGIN? Take 60 seconds to read what it means. And if you knew awk, you'd not have to do that, as it was directly lifted from awk.

replies(6): >>46176821 #>>46177405 #>>46179761 #>>46180293 #>>46180674 #>>46181535 #
1. crote ◴[] No.46181535[source]
> BEGIN? Take 60 seconds to read what it means.

Yes, that's exactly the problem: it's additional mental load you have to read up on.

Have 60 of those small oddities in a file, and suddenly you're spending an hour dealing with Perl quirks rather than actually debugging that obscure script a retired coworker wrote a decade ago. A 5-minute fix turned into a 65-minute fix, solely because of Perl.

Most programming languages use more-or-less the same constructs, and the few per-language oddities are usually fairly obvious from context. In practice this means someone familiar with any programming language will to a certain extent be able to read, debug, and patch small issues in code written in any other programming language. Perl's obscure and dense syntax makes this virtually impossible. Give a buggy Python script to a developer who daily-drives Javascript and they can probably fix it. Give a buggy Perl script to that same Javascript developer, and they probably have absolutely no clue what's going on.

In practice this turns Perl into technical debt. It has very few natural niches where it is genuinely the best, so experienced Perl developers are quite rare to have around. Any script written in Perl will most likely have to be read by someone who isn't an experienced Perl developer - which is significantly harder than a script written in just about any other language. The result is that any Perl scripts you have lying around are basically a grenade waiting to go off: they can't be maintained, so they should probably be replaced.