Lisp

Lisp is the oldest surviving family of symbolic programming languages: code as data, a read–eval–print loop, garbage collection, and macros that rewrite code at compile time. Common Lisp is its standardized industrial core; Scheme, Emacs Lisp, AutoLISP, and Clojure are members of the same family.

Purpose

Lisp is built around one radical idea: program text is a data structure, so programs can manipulate programs.

The Problem It Solves

Symbolic computation and metaprogramming. Everything is an S-expression — a list — so reading and writing code is just list processing. Macros run while compiling and generate the code you would otherwise write by hand. The REPL evaluates any expression instantly, which makes exploration and prototyping unusually fast. Lisp also pioneered features every language now copies: garbage collection, higher-order functions, and dynamic typing.

Where It Fits

Lisp is the ancestor of this phase’s symbolic family: AutoLISP (embedded in AutoCAD) and Clojure (modern, on the JVM) descend from it, and Prolog’s term/list model owes it a debt. In the logic-languages phase, Lisp carries the symbolic and functional end of the spectrum.

History

Lisp is to programming what calculus is to physics — defined early and still everywhere underneath.

Origins (1958)

John McCarthy created Lisp at MIT in 1958 to experiment with recursive functions over symbolic expressions; the famous paper Recursive Functions of Symbolic Expressions and Their Computation by Machine appeared in 1960, and the LISP 1.5 manual followed in 1962.

Milestones

  • 1975 — Scheme (Sussman & Steele) shows how small and elegant a Lisp can be.
  • 1984–1994 — Common Lisp unifies the “Lisp Tower” and becomes the ANSI standard X3.226-1994.
  • 1985 — Emacs Lisp makes Lisp the extension language of a world-famous editor.
  • 2007–2009 — Clojure re-launches Lisp on the JVM with immutability and concurrency at the core.

Current Status

A mature family with quiet, persistent activity: SBCL and Quicklisp keep Common Lisp practical, Scheme remains an educational standard, and Lisp ideas are woven into every modern language.

Stage

Lisp is finished-the-language, living-the-dialects: stable, standardized, and deliberately conservative.

Maturity

Fully mature. ANSI Common Lisp (1994) defines the industrial dialect; each member of the family is intentionally its own language, so “Lisp” names a family, not one implementation.

Governance & Maintenance

Decentralized: implementations (SBCL, CCL, ECL, CLISP) maintain themselves; Scheme evolves through RnRS reports; community lives in comp.lang.lisp, lispforum, and long-lived mailing lists.

Popularity & Usability

Small by the numbers, outsized by influence — the “most beautiful programming language” trope exists for a reason.

Adoption

Durable niches: ITA Software’s airline pricing engine ran on Lisp (now Google); Viaweb (the first web store builder) was Lisp; Emacs Lisp ships to millions; AI and programming-language courses still teach it.

Learning Curve

Two walls: prefix notation (a list reads as a function call) and “code is data”. Once comfortable, the REPL provides feedback most languages only recently matched. Macros are the advanced topic that rewards the effort.

Tooling

SBCL (native-code compiler), Quicklisp (package manager), SLIME/SLY in Emacs, Portacle (a batteries-included IDE), and Jupyter kernels for notebook-style work.

Use Cases

Lisp is chosen when metaprogramming, interactivity, or symbolic processing pays the rent.

Primary Domains

  • Symbolic AI historically: expert systems, planning, proof assistants’ forebears.
  • Extension languages: Emacs Lisp, and AutoLISP in AutoCAD (see its page in this phase).
  • Metaprogramming and DSL construction — the classic “make the language fit the problem” tool.
  • Rapid prototyping and programming-language pedagogy.

Strengths

First-class macros, interactive development, uniform syntax (read is a parser), optional typing, and a design that treats programs as data.

Weak Spots

A small ecosystem versus mainstream languages, a thin hiring pool, and library fragmentation across dialects.

Performance

Lisp’s performance story depends on the dialect and the compiler you choose.

Execution Model

Common Lisp compiles to native machine code (SBCL); type declarations and optimization settings push calls to the metal; macros move work to compile time. The costs to manage are allocations (consing) and garbage collection.

Published Claims

Community-consistent reports put SBCL numeric code within roughly a factor of two of C when declarations and hints are used, and near parity on tight loops. The honest rule: declare your types, avoid consing in hot paths, and profile before optimizing.

Example

One file showing the three Lisp pillars: functions, recursion, and a compile-time macro.

hello.lisp

;; hello.lisp — a function, a recursive countdown, and a macro
(defun shout (msg)                ; function definition
  "Return MSG in upper case."     ; docstring; text is data
  (string-upcase msg))

(defun count-down (n)
  (if (zerop n)                   ; base case
      (princ "Liftoff!")
      (progn (princ n) (princ " ")        ; do several things
             (count-down (1- n)))))       ; then recurse on n - 1

(defmacro twice (form)            ; macro: rewrites code at compile time
  `(progn ,form ,form))           ; splices FORM in twice

(print (shout "hello world"))
(terpri)
(count-down 3)
(terpri)
(twice (princ "x"))               ; expands to (princ "x") twice
(terpri)

How to Run

# Install SBCL (sbcl.org) — e.g.  apt install sbcl
sbcl --script hello.lisp
# HELLO WORLD
# 3 2 1 Liftoff!
# xx

The backquote-plus-comma in twice is quasiquotation: it builds code as data with ,form substituted in. Almost nothing else in mainstream programming lets you extend the compiler like this.

Learn More

Official sources and free materials; the full categorized catalog is on the References & Downloads page.

Official Docs & Downloads

Learning Material