The Roots of Lisp


The Roots of Lisp


May 2001


(I wrote this article to help myself understand exactly what McCarthy discovered. You don't need to know this stuff to program in Lisp, but it should be helpful to anyone who wants to understand the essence of Lisp-- both in the sense of its origins and its semantic core. The fact that it has such a core is one of Lisp's distinguishing features, and the reason why, unlike other languages, Lisp has dialects.)

1960年にジョン・マッカーシーは素晴らしい論文を発表し、ユークリッドが幾何学で行ったのと同様のことをプログラミング界で行った。彼は一握りの単純なオペレーターと関数用の記号があれば、プログラミング言語全体を構築できることを示した。彼の重要なアイデアの1つは、リストと呼ばれる単純なデータ構造をプログラムとデータの両方に使用することだったので、彼はこの言語を「List Processing(リスト処理)」のつもりでLispと名付けた。

In 1960, John McCarthy published a remarkable paper in which he did for programming something like what Euclid did for geometry. He showed how, given a handful of simple operators and a notation for functions, you can build a whole programming language. He called this language Lisp, for "List Processing," because one of his key ideas was to use a simple data structure called a list for both code and data.


It's worth understanding what McCarthy discovered, not just as a landmark in the history of computers, but as a model for what programming is tending to become in our own time. It seems to me that there have been two really clean, consistent models of programming so far: the C model and the Lisp model. These two seem points of high ground, with swampy lowlands between them. As computers have grown more powerful, the new languages being developed have been moving steadily toward the Lisp model. A popular recipe for new programming languages in the past 20 years has been to take the C model of computing and add to it, piecemeal, parts taken from the Lisp model, like runtime typing and garbage collection.

この記事で私は、マッカーシーが何を発見したのか、できるだけ簡単な言葉で説明したい。重要なのは、40年前に誰かが出した理論的に興味深い結果を学ぶことではなく、言語がどこに向かうのかを示すことだ。リスプが異常なのは(それはリスプが凄い理由なのだが)、リスプをリスプ自身で書けることだ。このことでマッカーシーが何をしたかを理解するために、彼の数学的な表現を実行可能なCommon Lispのプログラムに翻訳しつつ、私たちは彼の思考を辿ろうと思う。

In this article I'm going to try to explain in the simplest possible terms what McCarthy discovered. The point is not just to learn about an interesting theoretical result someone figured out forty years ago, but to show where languages are heading. The unusual thing about Lisp-- in fact, the defining quality of Lisp-- is that it can be written in itself. To understand what McCarthy meant by this, we're going to retrace his steps, with his mathematical notation translated into running Common Lisp code.