This is the seventh in a series of posts about Paul Graham’s book Hackers & Painters.
Ask anyone in academia about Lisp, and there’s a good chance that they’ll say it’s a great language for AI research, but not for industry. Paul Graham, on the other hand, calls it the “secret weapon” that allowed Viaweb to outdo their competitors at every turn. He adds a second datapoint: ITA Software, the company that powers Orbitz, also taps into the power of Lisp, which he believes was critical to the site’s success against Travelocity and Expedia.
Chapter 12, “Beating the Averages,” is all about what makes Lisp so great. He argues that it’s not just one of many high-level languages, but the highest-level language. Why don’t other programmers acknowledge this? He supposes that a programmer uses a language called Blub, which lies somewhere on the language spectrum near Java and Python. “As long as our hypothetical Blub programmer is looking down the power continuum, he knows he’s looking down. Languages less powerful than Blub are obviously less powerful, because they’re missing some feature he’s used to. But when our hypothetical Blub programmer looks in the other direction, up the power continuum, he doesn’t realize he’s looking up. What he sees are merely weird languages. He probably considers them about equivalent in power to Blub, but with all this other hairy stuff thrown in as well. Blub is good enough for him, because he thinks in Blub.”
Following this line of reasoning to its conclusion, Graham writes, “the only programmers in a position to see all the differences in power between various languages are those who understand the most powerful one.” Which, in his mind, is Lisp. He’s confident of this fact because Lisp is the only language with macros, and whenever he looks at another language, he wonders how those programmers can get anything done without macros.
In the next chapter, “Revenge of the Nerds,” Graham claims that mainstream languages are gradually moving ever closer to the ideal, Lisp, which was invented by John McCarthy all the way back in the 1950s. (Fascinatingly, McCarthy invented the language only as a theoretical notation. He had no intent of actually “running” that notation until one of his grad students, Steve Russell, wrote the first Lisp interpreter.) Ruby, for instance, is very nearly Lisp with a prettier syntax. The chapter includes an appendix of code examples that demonstrate the superior brevity of Lisp and Ruby for a particular (contrived) task. To my mind, the JavaScript code, though slightly longer, is the most readable; but this is undeniably because I tend to think in JavaScript.
I feel as though I should be arguing against Graham—his fervor borders on the religious—but I’m in no position to do so. What little I know about Lisp, I’ve learned from reading Hacker News. And certainly, there are some languages (Python, Scala) are superior to their more popular rivals (PHP, Java). So it seems that I have no alternative: I’ll have to learn Lisp. Maybe I, too, will be able to gaze down at all the other hackers one day.
[Addendum: Graham revisits “Revenge of the Nerds” in his 2002 essay “Succinctness is Power.”]


0 responses so far ↓
Comments are closed.