In addition to Guy Steele, principal wizards
have included Chris Hanson, Joe Bowbeer, Jim Miller, Guillermo Rozas,
and Stephen Adams. Others who have put in significant time are
Richard Stallman, Alan Bawden, Kent Pitman, Jon Taft, Neil Mayle, John
Lamping, Gwyn Osnos, Tracy Larrabee, George Carrette, Soma
Chaudhuri, Bill Chiarchiaro, Steven Kirsch, Leigh Klotz, Wayne Noss,
Todd Cass, Patrick O'Donnell, Kevin Theobald, Daniel Weise, Kenneth
Sinclair, Anthony Courtemanche, Henry M. Wu, Andrew Berlin, and Ruth
Shyu.
Beyond the MIT implementation, we would like to thank the many people
who worked on the IEEE Scheme standard, including William Clinger and
Jonathan Rees, who edited the R 4 RS, and Chris Haynes, David
Bartley, Chris Hanson, and Jim Miller, who prepared the IEEE standard.
Dan Friedman has been a long-time leader of the Scheme community.
The community's broader work goes beyond issues of language design to
encompass significant educational innovations, such as the high-school
curriculum based on EdScheme by Schemer's Inc., and the wonderful
books by Mike Eisenberg and by Brian Harvey and Matthew Wright.
We appreciate the work of those who contributed to making this a real
book, especially Terry Ehling, Larry Cohen, and Paul Bethge at the MIT
Press. Ella Mazel found the wonderful cover image. For the second
edition we are particularly grateful to Bernard and Ella Mazel for
help with the book design, and to David Jones, T E X wizard
extraordinaire. We also are indebted to those readers who made
penetrating comments on the new draft: Jacob Katzenelson, Hardy
Mayer, Jim Miller, and especially Brian Harvey, who did unto this book
as Julie did unto his book
Simply Scheme
.
Finally, we would like to acknowledge the support of the organizations that
have encouraged this work over the years, including support from Hewlett-Packard,
made possible by Ira Goldstein and Joel Birnbaum, and support from DARPA, made
possible by Bob Kahn.
Chapter 1
Building Abstractions with Procedures
The acts of the mind, wherein it exerts its power over simple ideas,
are chiefly these three: 1. Combining several simple ideas into one
compound one, and thus all complex ideas are made. 2. The second is
bringing two ideas, whether simple or complex, together, and setting
them by one another so as to take a view of them at once, without
uniting them into one, by which it gets all its ideas of relations.
3. The third is separating them from all other ideas that accompany
them in their real existence: this is called abstraction, and thus all
its general ideas are made.
John Locke,
An Essay Concerning Human Understanding
(1690)
We are about to study the idea of a
computational process
.
Computational processes are abstract beings that inhabit computers.
As they evolve, processes manipulate other abstract things called
data
. The evolution of a process is directed by a pattern of rules
called a
program
. People create programs to direct processes.
In effect, we conjure the spirits of the computer with our spells.
A computational process is indeed much like a sorcerer's idea of a
spirit. It cannot be seen or touched. It is not composed of matter
at all. However, it is very real. It can perform intellectual work.
It can answer questions. It can affect the world by disbursing money
at a bank or by controlling a robot arm in a factory. The programs we
use to conjure processes are like a sorcerer's spells. They are
carefully composed from symbolic expressions in arcane and esoteric
programming languages
that prescribe the tasks we want our
processes to perform.
A computational process, in a correctly working computer, executes
programs precisely and accurately. Thus, like the sorcerer's
apprentice, novice programmers must learn to understand and to
anticipate the consequences of their conjuring. Even small errors
(usually called
bugs
or
glitches
) in programs can have
complex and unanticipated consequences.
Fortunately, learning to program is
Aj Harmon, Christopher Harmon