zlacker

[return to "What Killed Perl?"]
1. killer+bB2[view] [source] 2025-11-20 01:56:37
>>speckx+(OP)
It's just a bad language.

It's the only programming language other than C which actually needs a tutorial on how to use arrays of arrays. It's a part of the standard Perl doc, appropriately named "perllol": https://perldoc.perl.org/perllol

Most popular languages (Python, JS, Java...) as well as classics like LISP manage references transparently - the distinction between "array" and "reference to an array" is abstracted out.

In Perl, it isn't. It's a language with some archaic elements of manual memory management and parameter passing quirks. It's very clear that Larry Wall was not guided by programming language theory or math-inspired abstractions, but "whatever shit would be easiest to implement" (from https://perldoc.perl.org/perlsub#SYNOPSIS):

> ... any arguments passed in show up in the array @_. The array @_ is a local array, but its elements are aliases for the actual scalar parameters. In particular, if an element $_[0] is updated, the corresponding argument is updated

Theorists described call-by-value, call-by-reference, etc. But our man Larry came up with pass-via-a-local-array-but-its-elements-are-aliases-for-the-actual-scalar-parameters. I can see how one can quickly hack this together. But maybe it's time to retire this.

◧◩
2. jujube+EZ2[view] [source] 2025-11-20 05:55:52
>>killer+bB2
Yeah, it was always a headache to put together complex data structures in Perl. It's kind of like bash in that way. Every time you need something like "a hash table that contains lists" it quickly turns into a quagmire. In Python you just... do it.
[go to top]