AI Wiki中文/EN

Lisp: symbolic structure becomes programmable

Lisp 与 AI 编程史

Read S-expressions, an interpreter and memory organization without merging early Lisp with all later dialects.

On this pageHistorical contextDates and evidenceContributions and methodsDebates and boundariesQuestions and exercisesResearch connections

The problem in its time

Numbers are convenient when the problem is a numerical table. A theorem, a sentence or a partly completed plan has a different shape: pieces nest inside other pieces, and a program may need to construct or rearrange that structure while it runs. Lisp made symbolic structure a practical subject of programming.

McCarthy’s 1960 paper begins with symbolic expressions and functions over them, then explains their computation by machine. The language’s significance is not simply that its notation has many parentheses. It connects a small set of operations on structured data with a representation of functions that can itself be processed as data. Recursive Functions of Symbolic Expressions and Their Computation by Machine, Part I

The retrospective History of Lisp is an author’s draft dated 12 February 1979. McCarthy explicitly says it gives insufficient recognition to some contributors and asks for corrections. That warning belongs in our use of the document: it is valuable participant evidence, not a complete neutral account of priority. History of Lisp — author’s draft, 12 February 1979

What the evidence establishes

The 1960 account defines S-expressions from atomic symbols and ordered pairs. It introduces atom and eq as predicates, car and cdr as selectors and cons as a constructor. Functions can recursively operate on these structures. The original definitions have domains: for example, eq is defined there only for atomic arguments, and the selectors require a non-atomic pair. Modern dialects should not be substituted silently for that historical specification. Recursive Functions of Symbolic Expressions and Their Computation by Machine, Part I

The accompanying implementation discussion explains list structures and storage sharing. A subexpression used by several larger expressions need not be stored repeatedly as separate linear strings. That choice helps explain why symbolic processing requires attention to memory organization as well as notation. Recursive Functions of Symbolic Expressions and Their Computation by Machine, Part I

In his later account, McCarthy credits S. R. Russell with recognizing that eval could serve as an interpreter and hand-coding it. He also describes decisions about recursion, stacks and garbage collection. These recollections make the implementation a collaborative engineering history rather than an invention attributed to a single line of mathematical notation. History of Lisp — author’s draft, 12 February 1979

Work through the idea

Work with an explicit pair structure: (A . (B . NIL)). Its first component is A; its remaining component is (B . NIL). In the original selectors’ notation, car returns the first component and cdr the second. Adding C at the front with cons produces (C . (A . (B . NIL))). The ordinary list notation (A B) is a convenient way to write the first structure when NIL marks its end.

Notice what is not happening. Taking cdr does not mean “remove the last letter from a string.” The object is a structured pair, and its second component can itself contain another pair. This is the difference between manipulating characters and following a symbolic structure.

Now distinguish an expression’s representation from its interpretation. In a contemporary Lisp-style illustration, (+ 2 3) can be interpreted as an addition request. The same three-element structure can instead be retained as data for a program that analyzes or transforms expressions. Merely possessing the list does not force arithmetic to happen; an evaluator and its rules provide that meaning. This illustration uses familiar modern notation, not a claim that every historical or current dialect treats every expression identically.

Finally, consider shared storage. Two plans may point to the same subplan. Sharing saves space, but a destructive change can affect both plans. Whether an operation copies or mutates structure is therefore part of its contract. The historical convenience of lists does not remove the need for that distinction.

Attribution and limits

Lisp’s association with AI does not mean that using Lisp gives a program intelligence. The language makes certain representations and experiments convenient; the program still needs an appropriate method, knowledge and evaluation. Other languages can manipulate symbolic structures too.

Historical Lisp is also not a single frozen semantics. The 1960 formal account, early machine implementations and later dialects differ. A modern claim about lexical closures, macros or equality needs the relevant dialect’s specification, not just a citation to McCarthy’s first paper.

Garbage collection illustrates the engineering tradeoff. Reclaiming unreachable storage can spare programmers some manual memory bookkeeping, but it still consumes resources and depends on a correct account of reachability. It is neither unlimited memory nor a substitute for designing suitable data structures. The retrospective explains why such implementation choices mattered to the project. History of Lisp — author’s draft, 12 February 1979

Exercises with answers

1. What is cdr of (A . (B . NIL))?

(B . NIL), the second component of the outer pair.

2. What does cons add to the example?

A new pair whose first component is C and whose second component is the existing A/B list.

3. Can the original paper’s eq definition be used as a universal structural-equality test?

No. That definition restricts eq to atomic arguments; other cases and later dialects require their own rules.

4. Why distinguish an expression as data from its evaluation?

The structure can be stored or transformed without executing its represented operation. Evaluation requires an interpreter and an environment.

Read the original sources

Read the 1960 paper’s sections on elementary S-functions and the Lisp programming system. Its formula images have textual alternatives that help preserve the original domains and notation. Read the implementation section of the 1979 history beside its opening warning about incomplete attribution.

Continue with Church and lambda calculus, recursion and Logic Theorist. Compare the language used to state a computation with the runtime that actually executes it. Recursive Functions of Symbolic Expressions and Their Computation by Machine, Part I; History of Lisp — author’s draft, 12 February 1979

Make a prediction, then check

Why can a Lisp expression be useful before it is evaluated?

Choose one answer

Learning objectives

  • Trace selectors and construction on a nested symbolic pair.
  • Separate historical formal definitions, implementation decisions and modern dialect semantics.

Prerequisites & connections

This article can be used as an entry point.

Explore related knowledge →

References

  1. Recursive Functions of Symbolic Expressions and Their Computation by Machine, Part I
    John McCarthy · 1960
  2. History of Lisp — author’s draft, 12 February 1979
    John McCarthy · 1979

Version1 · Editorial status: Recorded technical checks completed

View technical check record (AI)

Codex · 2026-09-07 · Codex single-AI-author historical check: bounded original sources, explicit attribution and chronology, original hand-traced examples, matched bilingual sections and exercises. Not independent human or second-agent review; no historical code execution claimed.

  • Single-AI-author historical check of bounded primary passages, chronology, attribution, claims versus later interpretation, and corresponding bilingual examples and exercises. No independent human or second-agent review; historical essays require no executable program.
  • Hand-checked pair selectors and cons; modern addition illustration explicitly distinguished from the original S-function domain restrictions.
  • Complete bilingual prose and corresponding exercises promoted with formal status and SHA binding. Algorithm tests read formal MDX; historical essays claim no executable program or computational tests.
  • Publication navigation points published topics to complete articles and removes corresponding pending wording, retaining directory entries for unwritten targets. Principles, equations, programs and exercises are unchanged; final article SHA values rebound.

Source locations checked:

Related topics

No matches. Try a synonym or acronym.

0 results shown

Wrap the whole query in double quotes for a phrase match.