Preface to the
2nd Edition

The material in this book has been the basis of MIT's entry-level computer science subject since 1980. We had been teaching this material for 4 years when the 1st edition was published, and 12 more years have elapsed until the appearance of this 2nd edition. We are pleased that our work has been widely adopted and incorporated into other texts. We have seen our students take the ideas and programs in this book and build them in as the core of new computer systems and languages. In literal realization of an ancient Talmudic pun塔木德双关语, our students have become our builders. We are lucky to have such capable students and such accomplished builders.

In preparing this edition, we have incorporated hundreds of clarifications suggested by our own teaching experience and the comments of colleagues at MIT and elsewhere. We have redesigned most of the major programming systems in the book, including

and we have rewritten all the program examples to ensure that any Scheme implementation conforming to the IEEE Scheme standard (IEEE 1990) will be able to run the code.

This edition emphasizes several new themes. The most important of these is the central role played by different approaches to dealing with time in computational models:

We have included new sections on concurrency and nondeterminism, and we have tried to integrate this theme throughout the book.

The 1st edition of the book closely followed the syllabus of our MIT one-semester subject. With all the new material in the 2nd edition, it will not be possible to cover everything in a single semester, so the instructor will have to pick and choose. In our own teaching, we sometimes skip the section on logic programming4.4), we have students use the register-machine simulator but we do not cover its implementation (§5.2), and we give only a cursory粗略的。参考cursor: 光标 overview of the compiler5.5). Even so, this is still an intense course. Some instructors may wish to cover only the first 3 or 4 chapters, leaving the other material for subsequent courses.

The website provides support for users of this book. This includes programs from the book, sample programming assignments, supplementary materials, and downloadable implementations of the Scheme dialect of Lisp.

1st Edition

SICP is the entry-level subject in computer science at the MIT. It is required of all students at MIT who major in electrical engineering or computer science, as 1/4 of the common core curriculum, which also includes 2 subjects on circuits and linear systems and a subject on the design of digital systems. We have been involved in the development of this subject since 1978, and we have taught this material in its present form since the fall of 1980 to between 600 and 700 students each year. Most of these students have had little or no prior formal training in computation, although many have played with computers a bit and a few have had extensive programming or hardware-design experience.

Our design of this introductory computer-science subject reflects 2 major concerns.   We want to establish the idea that

Our goal is that students who complete this subject should have a good feel for the elements of style and the aesthetics美学 of programming. They should

These skills are by no means unique to computer programming. The techniques we teach and draw upon are common to all of engineering design. We control complexity by

Underlying our approach to this subject is our conviction信念 that
computer science is not a science and that its significance has little to do with computers.
The computer revolution is a revolution in the way we think and in the way we express what we think.
The essence of this change is the emergence of what might best be called procedural epistemology认识论 --
the study of the structure of knowledge from an imperative命令式 point of view,
as opposed to the more declarative point of view taken by classical mathematical subjects:

In teaching our material we use a dialect of the programming language Lisp. We never formally teach the language, because we don't have to. We just use it, and students pick it up in a few days. This is one great advantage of Lisp-like languages: They have very few ways of forming compound expressions, and almost no syntactic structure. All of the formal properties can be covered in an hour, like the rules of chess. After a short time we forget about syntactic details of the language (because there are none) and get on with the real issues

Another advantage of Lisp is that it supports (but does not enforce) more of the large-scale strategies for modular decomposition of programs than any other language we know. We can All of this is embedded in an interactive environment with excellent support for incremental program design, construction, testing, and debugging. We thank all the generations of Lisp wizards, starting with John McCarthy, who have fashioned a fine tool of unprecedented空前的,史无前例的 power and elegance.

Scheme, the dialect of Lisp that we use, is an attempt to bring together the power and elegance of Lisp and Algol.

We wish to cite John Reynolds and Peter Landin for their insights into the relationship of Church's lambda calculus to the structure of programming languages. We also recognize our debt to the mathematicians who scouted out侦察 this territory领域 decades before computers appeared on the scene. These pioneers include