zlacker

[return to "What Killed Perl?"]
1. downsp+Y02[view] [source] 2025-11-19 21:40:31
>>speckx+(OP)
There's more than one thing that "killed perl" (I still use it almost every day.)

But I think the main thing that made it long term non competitive were a series of bad design choices all the way back to perl 4 or even 1.

Namely:

- the need for sigils

- weird sigil rules where the 0 element of @x is $x[0] not @x[0]

- auto flattening, ex. (@a, @b), and hence the need for manual reference management, as in (\@a, [1,2,3])

- lack of a native object system, and widespread repurposing of hashrefs as objects, with awkward field syntax $x->{foo}

- awkward function argument syntax: my ($x, $y) = @_;

These things add up, and both JS and python showed that all those can be done much more smoothly.

Another thing that counted at the time, is that PHP came out with a slightly worse language, but a super beginner-friendly approach to html templating and request lifecycle: you can just mix php and html in the same file, and the entire runtime environment is nuked at each request. The result was that php replaced perl for an entire generation of web devs in the early 2000s.

◧◩
2. kwoff+FI2[view] [source] 2025-11-20 02:57:21
>>downsp+Y02

  - weird sigil rules where the 0 element of @x is $x[0] not @x[0]
'@' and '%' indicate containers, while '$' is a scalar (which containers can contain). So '$x[0]' is referring to a scalar within the '@x' container. If you operate on a container, like 'push @x, 2', it uses the container sigil.

I guess "weird" triggered me a bit, heh. I know it's subjective.

◧◩◪
3. cowboy+vN3[view] [source] 2025-11-20 13:48:19
>>kwoff+FI2
haha even your explanation looks 'write only'
[go to top]