The Roots of Lisp
May 2001 (I wrote this article to help myself understand exactly what McCarthy discovered.
2001 年 5 月(我写这篇文章是为了帮助自己准确理解麦卡锡的发现。
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.
你不需要知道这些东西就可以用 Lisp 编程,但它应该对任何想要理解 Lisp 本质的人有所帮助——无论是在它的起源还是它的语义核心方面。
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.)
事实上,它具有这样的核心,这是 Lisp 的显着特征之一,也是 Lisp 与其他语言不同的原因,它有方言。)
In 1960, John McCarthy published a remarkable paper in which he did for programming something like what Euclid did for geometry.
1960 年,约翰·麦卡锡 (John McCarthy) 发表了一篇出色的论文,其中他在编程方面所做的工作就像欧几里得在几何学方面所做的那样。
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.
他将这种语言称为 Lisp,意为“列表处理”,因为他的关键思想之一是对代码和数据使用一种称为列表的简单数据结构。
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.
在我看来,到目前为止已经有两种真正干净、一致的编程模型:C 模型和 Lisp 模型。
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.
正在开发的新语言一直在稳步向 Lisp 模型迈进。
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.
过去 20 年,新编程语言的一个流行配方是采用 C 计算模型,并逐步添加取自 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.
Lisp 的不同寻常之处——事实上,Lisp 的定义品质——是它可以自行编写。
To understand what McCarthy meant by this, we're going to retrace his steps, with his mathematical notation translated into running Common Lisp code.
为了理解 McCarthy 的意思,我们将追溯他的步骤,将他的数学符号转化为运行的 Common Lisp 代码。