Atlas · Details
Ancient Languages: Perl
Author’s note
This is a no-punches-pulled takedown of Perl, because it was actively harming the industry. But I should have been nicer to Larry Wall, who to his credit, did invent something that people loved for a long time.
I met Larry at a party once, and apologized to him. He was very gracious about it.
AI Notes
Written at Amazon in late 2004, where Perl was the house language and Steve was, as he puts it, "nominally responsible for developer training" — so when he reports what fraction of classroom time a single language feature eats, he is reading off his own syllabus. The framing gag: this is supposedly a "short, dispassionate, take-it-or-leave-it explanation" to file with the coding conventions of a company he hasn't founded yet, and he keeps count of his wine glasses as the dispassion drains away. The evidence is mostly primary source. There is a bullet-point translation of what Larry Wall's "postmodern" speech actually claims, and a verbatim dump of the official documentation for one two-character operator, entered as Exhibit B and left to incriminate itself. A late digression about Lego pirate-ship sets carries more of the argument than any syntax complaint does.
Down in the comments Steve admits he spent over a year trying to finish this politely, and only got it out the door once he decided to answer Larry's marketing with attack ads of his own; that decision produced the weakest stretch of the piece, the sustained run at Wall's sanity, which an Amazon colleague challenged within days and which Steve defended, at the time, by quoting Hannibal Lecter. And near the end sits a short passage on writing a compiler as the cure for language religion — losing your innocence, watching your code resolve into a parse tree — that Steve would grow into "Rich Programmer Food" three years later. This is that essay's seed, planted mid-rant. The tactical advice aged well: "use Ruby. Or Python" was the right call in 2004, and Perl 6 spent the next decade proving him right by not arriving.
Related listings
-
2005
Choosing Languages
Same arc — the column where Steve actually names which languages he does want to use (Java + Ruby). The Perl piece is the negative space around that decision.
-
2004
Tour de Babel
Same year — the broader survey that frames the verdict. Tour de Babel is the museum tour; Ancient Languages: Perl is one room's plaque, expanded.
-
2005
Language Trickery and EJB
A near-companion. The Perl rant is the negative case (a language that aged into a museum); Language Trickery is the positive case (what good design lets you reach for).
Where it was argued
- Hacker News Aug 2013
From the peanut gallery
Read the rest of the thread · 3 more
-
(Is it bad form to reply to my own comments?)
>>>The lack of truly polymorphic access to the built-in containers in Common Lisp is rather annoying.
But I just noticed that (coincidentally) Michael Parker has written at least a partial fix for that too:
http://www.geocities.com/mparker762/
>>>Also a generalized reference system, so you can get and set lists, arrays, strings, hashtables etc polymorphically.
>>> This is not yet a full generalized container system, but
it's a handy first step.
If language designers can't be relied upon to get everthing right in every case (as seems likely), then the best alternative is to give the users a way to fix and extend things themselves.
-
I'd say the ad hominem attacks on Wall were unnecessary, except they seem to form at least 1/3 of your argument. If you had ever met the guy, or attended a State of the Onion talk, you would see how humble this guy is. Expectations are so high for his talks to be hilarious and insightful simultaneously that sometimes he misses both marks, understandably. And, you have to give some slack since the talk was intended to be given only with aural sarcasm and only for Perl & Linux zealots.
Anyway, I think of perl perhaps in a reverse way, trying not to miss the forest for the trees. There are certainly too many quirks in the language, that basically just have to be memorized (list flattening is one of them) - and probably more in Perl than in any other language. Perl doesn't appear to be derived from a minimal set of regular rules; rather it is, but to a language theorist there are so many exceptions as to drive you crazy. Perl is to computer languages as English is to natural languages.
Generally these are the result of well-intended DWIM (Do What I Mean) that has aged poorly. That's why perl has a "cult" - if your DWIM matches well with perl's DWIM, you are a happy camper; if not you are stevey. :) Actually the large number of well-intended yet stupid DWIM's in Perl 5 are the driving force for Perl 6. If it ever arrives, it's anybody's guess whether Ruby programmers will flee to Perl6 the way Perl5 programmers are currently fleeing to Ruby.
Ultimately the productivity, success, and happiness of the people using perl will have to be the judge of the success of the language itself.
I wish your future non-Perl company well. But don't worry about Perl at Amazon. All our programmers who use Perl also use at least 1 other language daily...let's get the same from our Java programmers.
-
Thanks for the well-considered comments, Doug. The essay is just my own opinions, and language discussions always come down to matters of taste, so my responses here are of little worth. Nevertheless...
> I'd say the ad hominem attacks on Wall were unnecessary
I'm afraid they really are necessary. Larry has turned what was a gentleman's war into guerilla tactics. He consistently and cleverly (I never said he wasn't brilliant) slanders other languages and language communities, and encourages this behavior in his lieutenants. He's made logical fallacies fair game, and he regularly crosses the bounds of common decency, so I have no qualms about employing ad hominem in response. I've given it considerable thought, and tried for at least a year to finish this essay. It was only when I realized I have to combat his tactics with my own political commercials that I was able to make progress. So ad-hominem it is. He's crazy, and I'm not going to politely gloss over the issue. Reminds me of this movie dialogue:
Will Graham: I know that I'm not smarter than you.
Doctor Hannibal Lecktor: Then how did you catch me?
Will Graham: You had... disadvantages.
Doctor Hannibal Lecktor: What disadvantages?
Will Graham: Passion. And you're insane.
> you would see how humble this guy is.
What he's like in person is irrelevant. Most of the world hears his message through his writing, as he well knows. His speech is by no means an atypical example of his writing, so his behavior at conferences can only be considered posturing. He is the consummate marketer, after all.
> Perl is to computer languages as English is to natural languages.
This is far and away the strongest argument against Perl. English is a terrible language, desperately in need of spelling and grammatical reform. By anyone's standards, it should be the last model you'd use for a design philosophy. Larry uses "Just like English" as one of his typical silly appeals to nonreason. Not surprisingly, Perl isn't very popular in non-English-speaking countries; they know better.
> Ultimately the productivity, success, and happiness of the people
> using perl will have to be the judge of the success of the language
This might be true, if you find a way to include the productivity, success and "happiness" of people who are forced to use it because there's so much of it at Amazon. Many people are miserable about the whole Perl experience, yet Perl's marketing (which is also conducted internally by card-carrying cult members) makes folks feel it's their fault for not liking it better.
> let's get the same from our Java programmers.
Indeed. Everyone ought to be comfortable with at least five languages. Twenty is even better. The one I've been tackling most recently, incidentally, is PostScript. Knowing a whole bunch of languages is very nearly as effective as writing a compiler or interpreter.
Perl, for all its flaws, is still preferable to C++ in most cases.
But what do you do until that day when you get to start your own non-Perl-based tech company? Is there gritting of teeth involved, or do you just go about your daily business, secure in the knowledge that you will do it differently - someday? I'm being a little cheeky, but it's also sort of a serious question stemming from my newness to Amazon.
I had a whole lot of flexibility at earlier positions, and I used this to my advantage: using Python when I thought it was the right tool for the job, using Ruby for other projects. That worked fine, but these were smaller ponds where I was a relatively big fish. What happens here, where it's a very very big pond indeed?
— Brian W · December 6, 2004 09:10
Another terrific essay Steve. I'm citing your blog to potential new-hires as another reason to work at Amazon...
On the clunkiness of the alternatives to Perl...
You include lisp, and with some good reason (The lack of truly polymorphic access to the built-in containers in common lisp is rather annoying. And string support is a bit insane in places.)
But at least lisp lets you _fix_ the things that you don't like, and in a seamless way. It's easy (as Paul Graham is doing in Arc) to write a variant of
'let'that defaults to a single binding and so eliminates all of the parentheses. And if you don't like the default hashtable functions, just write some convenient syntax wrappers.e.g. Michael Parker has written reader-syntax macros that implement most of Awk in Common Lisp
"Lisp isn't a language, it's a building material." - Alan Kay.
— Chris N · December 6, 2004 06:28