# Common Lisp

> Source: https://aiwiki.ai/wiki/common_lisp
> Updated: 2026-06-23
> Categories: AI History, Computer Science, Programming Languages
> From AI Wiki (https://aiwiki.ai), a free encyclopedia of artificial intelligence. Quote with attribution.

**Common Lisp** is the ANSI-standardized dialect of the [Lisp](/wiki/lisp) family and was, from the late 1980s through the early 1990s, the dominant programming language of [symbolic AI](/wiki/symbolic_ai) research. It is a multi-paradigm, dynamically typed, general-purpose language standardized as **ANSI X3.226-1994** (now INCITS 226-1994), approved on December 8, 1994, and with the [Common Lisp Object System](/wiki/clos) included it became the first object-oriented language to receive an ANSI standard.[1][2][30]

Common Lisp was created by a committee in the early 1980s as a unification of several diverging Lisp dialects then in use across [DARPA](/wiki/darpa)-funded AI laboratories. It descends directly from the [Lisp](/wiki/lisp) that [John McCarthy](/wiki/john_mccarthy) invented at MIT in 1958, which is the second-oldest high-level programming language still in widespread use; only Fortran, by about one year, is older.[4][30] Common Lisp is best known for four things: a powerful macro system rooted in [homoiconicity](/wiki/homoiconicity), a built-in object system called [CLOS](/wiki/clos) with [multiple dispatch](/wiki/multiple_dispatch) and a metaobject protocol, a condition and restart system more flexible than ordinary exception handling, and an unusually large standard. The COMMON-LISP package defines exactly 978 external symbols, making it one of the largest standardized core languages.[3][14][31] It powered the [expert systems](/wiki/expert_system) boom and the [Lisp machine](/wiki/lisp_machine) industry, and it remains in active use in computer algebra, planning systems, commercial scheduling software, and a small but committed open-source community.[3][4]

Common Lisp was designed for production AI work. Standardization was funded in part by DARPA so AI projects spread across [MIT](/wiki/mit), [CMU](/wiki/cmu), Stanford, BBN, and the Lisp machine vendors could share code. After the [AI Winter](/wiki/ai_winter) the language lost mainstream momentum, but it left a deep mark on later languages: [Dylan](/wiki/dylan_programming_language), [Clojure](/wiki/clojure), and [Julia](/wiki/julia) all borrow heavily from Common Lisp, and Python's metaclass system traces its lineage to the CLOS metaobject protocol.[5][6]

## Why was Lisp the language of AI?

Lisp and artificial intelligence grew up together. [John McCarthy](/wiki/john_mccarthy), who coined the term "artificial intelligence" in 1955, began developing Lisp in 1958 to give AI researchers a notation for manipulating symbolic expressions rather than numbers. His foundational paper, "Recursive Functions of Symbolic Expressions and Their Computation by Machine, Part I," appeared in *Communications of the ACM* in April 1960 and described the language as a mathematical formalism, including a self-describing interpreter written as the function `eval`.[30][32] McCarthy intended `eval` only as a theoretical illustration; his student Steve Russell read the paper, realized `eval` could be hand-translated into IBM 704 machine code, and did so, producing the first Lisp interpreter to McCarthy's surprise.[32]

Because Lisp programs are themselves Lisp data (a property called [homoiconicity](/wiki/homoiconicity)), the language let researchers write programs that read, transform, and generate other programs, exactly the kind of self-modifying, knowledge-manipulating system that the [symbolic AI](/wiki/symbolic_ai) (or GOFAI, "good old-fashioned AI") program required. Through the 1960s and 1970s, MacLisp at MIT and Interlisp at Xerox PARC and BBN became the standard tools of the field, and essentially every major AI laboratory built its work on a Lisp dialect. Common Lisp inherited that community when it consolidated those dialects in the 1980s.[1][7]

## History

### Background: the dialect zoo of the late 1970s

By the end of the 1970s the [Lisp](/wiki/lisp) family had fragmented into more than a dozen major dialects, none portable to the others. Significant Lisps in active use included MacLisp at MIT, Interlisp at Xerox PARC and BBN, Lisp Machine Lisp and Zetalisp at MIT and [Symbolics](/wiki/symbolics), Spice Lisp at CMU, NIL at MIT, Standard Lisp at Utah, Franz Lisp at UC Berkeley, and Portable Standard Lisp. A program written in MacLisp would not load into Interlisp without substantial rewriting, and the cost of this fragmentation fell on [DARPA](/wiki/darpa), which funded most of the AI research being done across these systems.[1][7]

### The 1981 CMU meeting and CLtL1

In April 1981 a meeting at Carnegie Mellon, organized by [Scott Fahlman](/wiki/scott_fahlman) of CMU's Spice Lisp project and attended by representatives from MIT, Stanford, Symbolics, Lisp Machines Inc., DEC, and Bell Labs, set out to define a common dialect that would unify MacLisp-derived Lisps. Participants wanted a Lisp portable across stock hardware, suitable for large AI applications, and not so minimal that it would force everyone to reinvent libraries.[1][7][8]

The initial design effort was carried out almost entirely by electronic mail over the ARPAnet. The technical core included [Guy Steele](/wiki/guy_steele) of Tartan Labs, Fahlman, [Daniel Weinreb](/wiki/daniel_weinreb) and [David Moon](/wiki/david_moon) of Symbolics, and [Richard Gabriel](/wiki/richard_gabriel) of Lawrence Livermore (later Lucid). The first concrete artifact was the book *Common Lisp the Language*, written by Steele with the assistance of Fahlman, Gabriel, Moon, and Weinreb, published by Digital Press in 1984. The 465-page volume, known as CLtL1, was distilled from the committee's email archives and functioned as the de facto standard for the rest of the decade. It specified lambda lists with required, optional, rest, and keyword parameters; the package system; sequences; `defstruct`; multiple values; the printer and reader; format strings; and a numeric tower with bignums, ratios, and complex numbers. It did not yet specify an object system, a condition system, or a foreign function interface.[1][9]

### CLOS, conditions, and CLtL2 (1986 to 1990)

During 1986 to 1988 a separate working group developed the [Common Lisp Object System](/wiki/clos). The specification by Bobrow, DeMichiel, [Richard Gabriel](/wiki/richard_gabriel), Sonya Keene, [Gregor Kiczales](/wiki/gregor_kiczales), and [David Moon](/wiki/david_moon) appeared as a special issue of *SIGPLAN Notices* in September 1988. CLOS borrowed from the Lisp Machine Lisp Flavors system and from CommonLoops, introducing multiple dispatch, multiple inheritance, and method combination.[10] The [metaobject protocol](/wiki/metaobject_protocol) (MOP) was specified later in *The Art of the Metaobject Protocol* by Kiczales, Jim des Rivieres, and Bobrow (MIT Press, 1991), exposing CLOS as itself a CLOS program so users can extend the object system through subclassing.[11]

A condition system designed by [Kent Pitman](/wiki/kent_pitman) replaced the older error-handling mechanism. Conditions are CLOS objects; restarts are named recovery options that the signaling code makes available to handlers further up the stack. Handlers can choose among published restarts without unwinding, an idea that distinguishes Common Lisp's handling from C++ and Java exceptions.[3] A second edition, CLtL2, by Steele appeared in 1990 at 1029 pages, documenting committee progress including CLOS, conditions, LOOP, and pretty printing.[12]

### How did Common Lisp become an ANSI standard?

Formal standardization was conducted by ANSI subcommittee **X3J13**, chartered in 1986 and holding its first meeting in September 1986. Over eight years the committee resolved more than 1,000 technical issues to reconcile divergences among the existing dialects. The final standard was approved on December 8, 1994, as **ANSI X3.226-1994**, later redesignated **INCITS 226-1994**, running to roughly 1,100 pages.[2][30] With CLOS included, Common Lisp became the first object-oriented language to receive an ANSI standard. It was reissued without change in 2004 as INCITS 226:1994(R2004). A hyperlinked version called the *Common Lisp HyperSpec*, edited by Pitman and published by Harlequin (later LispWorks) in 1996, is freely available online and is the reference most working programmers consult.[2][13][14]

## What is Common Lisp as a language?

Common Lisp is multi-paradigm. It supports imperative code with assignments and loops, functional code with first-class functions and closures, object-oriented code through CLOS, and declarative styles through macros. The language defines about 25 special operators, 978 standardized external symbols in the COMMON-LISP package, and a deep numeric tower.[3][14][31]

**Dynamic typing.** Values carry their type at runtime; the same variable can hold an integer, a string, a function, or a hash table. [Optional type declarations](/wiki/dynamic_typing) via `declare` and `the` let compilers such as SBCL omit runtime type checks and generate native machine code competitive with C on numeric kernels.[15]

**First-class functions and lexical closures.** Functions are values that can be passed to and returned from other functions and stored in data structures. The `lambda` form constructs anonymous functions that close over their lexical environment. Common Lisp uses [lexical scope](/wiki/lexical_scope) by default for local bindings, with optional dynamic scope through variables declared `special`.[3]

**Multi-namespace (Lisp-2).** Common Lisp keeps function bindings and value bindings in separate namespaces, so the symbol `list` can name both a function and a variable in the same scope. This Lisp-2 design was inherited from MacLisp; to call a function held in a variable, programmers use `funcall` or `apply`. The Lisp-2 question was the most contentious split between Common Lisp and [Scheme](/wiki/scheme), which took the Lisp-1 path with a single namespace.[16]

**Symbol packages.** Symbols are interned in packages, namespaces that prevent name collisions. The standard ships `COMMON-LISP`, `KEYWORD`, and `COMMON-LISP-USER`.[3]

**Conditions and restarts.** When a function detects an error, it signals a condition object. Handlers established by `handler-case` or `handler-bind` higher up the stack inspect the condition and either return a value, abort, or invoke one of the named restarts that the signaling code published. The system separates policy from the mechanics of recovery, and it lets interactive debuggers offer restarts at the [REPL](/wiki/repl).[3]

**Macros and parameter forms.** `defmacro` defines compile-time procedures that take s-expressions and return s-expressions. Reader macros extend syntax. Compiler macros provide optimization hooks. Lambda lists declare required parameters and then `&optional`, `&rest`, `&key`, and `&aux` sections; keyword arguments are matched by self-quoting symbols at the call site.[3][14]

**Generic functions.** CLOS adds `defgeneric` and `defmethod`, replacing the message-passing model with multimethods. A generic function dispatches on the runtime classes of all required arguments; there is no privileged "receiver" as in Java or C++.[10]

**Tail-call optimization and GC.** The standard does not require tail-call optimization, in deliberate contrast with [Scheme](/wiki/scheme). Most production implementations optimize tail calls in compiled code, but programmers cannot rely on it portably; the idiom for unbounded iteration is `loop`, `do`, or `dolist`. The standard does require automatic [garbage collection](/wiki/garbage_collection); SBCL and CCL use generational copying collectors.[3][15]

## Common Lisp Object System (CLOS)

CLOS is the object-oriented layer of the standard, designed during 1986 to 1988 by Bobrow, DeMichiel, [Richard Gabriel](/wiki/richard_gabriel), Keene, [Gregor Kiczales](/wiki/gregor_kiczales), and [David Moon](/wiki/david_moon), incorporated into CLtL2 in 1990, and finalized in the 1994 ANSI standard. It differs from object systems familiar from C++, Java, or Python in several important ways.[10][14]

**Multiple dispatch.** A method belongs to a generic function rather than to a class. When a generic function is called, the system selects applicable methods by matching the runtime classes of every required argument against the parameter specializers, then orders them by the class precedence list. There is no "this" pointer; binary methods like `collide` can dispatch on both arguments equally.[10]

**[Multiple inheritance](/wiki/multiple_inheritance) with class precedence list.** A class can name several direct superclasses. A linearization algorithm, similar to but predating Python's C3, computes a class precedence list (CPL) that orders the class and all ancestors. Slot inheritance, method ordering, and `slot-value` lookup all follow the CPL.[10][14]

**Method combination.** Programmers can write `:before`, `:after`, and `:around` methods alongside primary methods. Standard method combination runs all `:before` methods (most-specific first), then the most-specific primary method (which may call `call-next-method`), then all `:after` methods; `:around` methods wrap the entire call. Other built-in combinations (`progn`, `+`, `list`, `and`, `or`) and user-defined combinations let programmers customize dispatch.[10]

**Metaobject Protocol.** Kiczales and colleagues defined the [metaobject protocol](/wiki/metaobject_protocol) as a meta-level architecture for CLOS itself. Classes, generic functions, and methods are themselves CLOS objects of metaclasses (`standard-class`, `standard-generic-function`, `standard-method`). By subclassing metaobject classes and specializing protocol methods such as `compute-applicable-methods`, users can extend the object system without forking the implementation. The MOP is the conceptual ancestor of aspect-oriented programming and influenced metaclasses in Python.[11]

A minimal CLOS example:

```
(defclass point ()
  ((x :initarg :x :accessor x)
   (y :initarg :y :accessor y)))

(defclass colored-point (point)
  ((color :initarg :color :accessor color)))

(defgeneric distance (a b))

(defmethod distance ((a point) (b point))
  (sqrt (+ (expt (- (x a) (x b)) 2)
           (expt (- (y a) (y b)) 2))))

(defmethod distance :around ((a colored-point) (b colored-point))
  (format t "comparing colored points~%")
  (call-next-method))
```

## Macros and metaprogramming

Common Lisp's macro facility is the feature most often cited as the language's defining advantage. Because every Lisp program is also a Lisp data structure (an [s-expression](/wiki/s_expression)), macros are ordinary functions from s-expressions to s-expressions, run at compile time, whose output the compiler sees in place of the call site. This [homoiconicity](/wiki/homoiconicity) has been a feature of Lisp since 1958.[3][17]

A `defmacro` form names a macro, gives it a destructuring lambda list, and provides a body that returns a transformed form. Templates are written with the backquote (`` ` ``) reader macro: `,` splices a value and `,@` splices list elements. The reader is extensible via `set-macro-character`, so libraries can ship custom syntax (infix arithmetic, regex literals) without modifying the host. Common Lisp also offers `define-symbol-macro` and `define-compiler-macro` for optimization rewrites.

Common Lisp macros are not hygienic in the strict sense of [Scheme](/wiki/scheme)'s `syntax-rules`. Programmers avoid variable capture using `gensym` to generate unique symbols. The cost is real but small, and the gain is greater expressive power, since macros can deliberately introduce names user code refers to ("anaphoric" macros).

A simple `when` macro and an anaphoric `aif` that binds the test result to `it`:

```
(defmacro my-when (test &body body)
  `(if ,test (progn ,@body) nil))

(defmacro aif (test then &optional else)
  `(let ((it ,test))
     (if it ,then ,else)))
```

Books devoted to Common Lisp macros include [Paul Graham](/wiki/paul_graham)'s *On Lisp* (1993) and Doug Hoyte's *Let Over Lambda* (2008).[17]

## What implementations of Common Lisp exist?

Common Lisp has more than a dozen serious implementations.

| Implementation | License | Notes |
| --- | --- | --- |
| [SBCL](/wiki/sbcl) (Steel Bank Common Lisp) | Public domain / BSD | Forked from CMUCL in December 1999; fastest open-source CL; multi-platform native compiler. |
| Clozure CL (CCL) | Apache 2.0 | Descendant of Macintosh Common Lisp; x86-64 and Apple Silicon. |
| CLISP | GPL | Bytecode interpreter; cross-platform; once the standard GNU CL. |
| ECL (Embeddable Common Lisp) | LGPL | Compiles via C; embeddable in C/C++ applications. |
| ABCL (Armed Bear Common Lisp) | GPL | Targets the JVM; can call Java directly. |
| GCL (GNU Common Lisp) | LGPL | Descendant of Kyoto CL; used historically by Maxima and Axiom. |
| Allegro CL | Commercial | Franz Inc., 1984; AllegroGraph triplestore. |
| LispWorks | Commercial | Cross-platform IDE; CAPI GUI toolkit. |
| CMUCL | Public domain | CMU Spice Lisp project; SBCL forked from this. |
| Symbolics Open Genera | Commercial | Lisp Machine OS as VM on Alpha and x86. |
| Lucid Common Lisp | Discontinued | Major commercial CL of the 1980s; vendor closed 1994. |

[SBCL](/wiki/sbcl) is the de facto reference for open-source work in the 2020s. It was forked from CMUCL in December 1999; the name puns on Andrew Carnegie (steel) and Andrew Mellon (banking), the namesakes of Carnegie Mellon, and SBCL is now by a wide margin the most-used Common Lisp implementation. Allegro CL and LispWorks are the surviving major commercial vendors.[15][33]

## What is Common Lisp used for in AI?

Common Lisp inherited the AI research community of MacLisp, Lisp Machine Lisp, and Interlisp; through the 1980s essentially every DARPA-funded AI lab moved to it, and it became the working language of [symbolic AI](/wiki/symbolic_ai) and the [expert systems](/wiki/expert_system) industry. Major systems include:

- **[MACSYMA](/wiki/macsyma)**, the symbolic algebra system started at MIT Project MAC in July 1968 (its name stands for "Project MAC's SYmbolic MAnipulator"), written in Maclisp, later ported to Common Lisp and revived as the open-source [Maxima](/wiki/maxima). It pioneered symbolic differentiation, integration, equation solving, and polynomial factorization.[34]
- **SHRDLU**, Terry Winograd's natural-language understanding program built at the MIT AI Laboratory between 1968 and 1970, let a user converse with a computer about a simulated "blocks world." It was implemented in Micro-Planner embedded within Lisp on a DEC PDP-6 and became one of the most-cited early demonstrations of machine language understanding.[35]
- **[Cyc](/wiki/cyc)**, the common-sense knowledge base started by [Doug Lenat](/wiki/doug_lenat) at MCC in July 1984 (founded partly to counter Japan's Fifth Generation project), implemented in SubL, a variant of Common Lisp originally run on Lisp machines. Cyc grew into a corpus of roughly 1.5 million concepts and 25 million rules, the largest hand-built knowledge base in AI history.[18][36]
- **[Naughty Dog](/wiki/naughty_dog) game engines**: co-founder [Andy Gavin](/wiki/andy_gavin) wrote a Common Lisp dialect, GOOL (Game Oriented Object Lisp), used to script *Crash Bandicoot* (1996) and its 1997 sequel. For *Crash Bandicoot 3: Warped* (1998) and Jak and Daxter, Naughty Dog used a successor, GOAL (Game Oriented Assembly Lisp), compiling directly to PlayStation MIPS assembly. Both inherited heavily from Common Lisp.[19]
- **[ITA Software](/wiki/ita_software)** (1996) built the [QPX](/wiki/qpx) airfare search engine in Common Lisp on SBCL and Allegro CL, powering Orbitz and other booking sites. Google acquired ITA in April 2011 for about $700 million, and QPX became the engine behind [Google Flights](/wiki/google_flights). ITA described the codebase as millions of lines of Common Lisp.[20][21]
- **[Grammarly](/wiki/grammarly)** (founded 2009) built its early grammar engine in Common Lisp. A 2014 post ("Running Lisp in Production") described SBCL processes applying grammar rules within a hybrid of non-Lisp services around the Lisp core.[22]
- **NASA Deep Space 1 Remote Agent.** The 1999 Remote Agent Experiment, the first AI control system to fly on a NASA mission, was written in Common Lisp. It integrated planner (EUROPA), executive, and diagnosis components, and the Lisp code aboard famously survived a deadlock bug debugged remotely.[23]
- **Mirai** (Nichimen Graphics), used on *The Lord of the Rings: The Two Towers* (2002) to animate Gollum, was implemented in Common Lisp.[24]
- **Boeing** has used Common Lisp in scheduling. **AutoCAD** ships [AutoLISP](/wiki/autolisp), a smaller dialect.

Common Lisp lost ground through the 1990s as Lisp machines collapsed and commercial seats remained expensive. Grammarly and several smaller firms migrated away in the 2010s, citing hiring difficulty.[22]

## Why did Common Lisp decline? The AI Winter

The collapse of the [Lisp machine](/wiki/lisp_machine) industry and the broader [AI Winter](/wiki/ai_winter) of the late 1980s pulled the language down with them. [Symbolics](/wiki/symbolics), founded in 1980 to sell Lisp workstations to AI labs and expert-system builders, reported revenue of about $115 million in 1986 and registered the first ever .com domain (symbolics.com) in 1985. But in 1987 the market for specialized Lisp hardware collapsed as cheap, fast general-purpose Unix workstations made $100,000 Lisp machines uncompetitive. Lisp Machines Inc. went bankrupt in 1987; Texas Instruments and Xerox abandoned the field; and Symbolics filed for Chapter 11 bankruptcy in 1993. Many of these vendors' customers had been funded by DARPA grants tied to expert-system and Strategic Computing programs, and DARPA's funding cuts in the late 1980s removed that demand at the same moment the technology's brittleness disappointed commercial buyers.[37][38]

The lesson the field drew, that hand-built symbolic systems were brittle and expensive, is part of why AI research shifted toward statistical and, later, neural methods. Common Lisp survived as a language but never recovered its position as the default tool of AI.

## Notable libraries

Common Lisp's library ecosystem is small compared to Python or JavaScript but mature.

| Library | Purpose | Notes |
| --- | --- | --- |
| [Quicklisp](/wiki/quicklisp) | Package manager | Zach Beane, 2010; de facto installer. |
| [ASDF](/wiki/asdf) | Build system | Another System Definition Facility. |
| Bordeaux Threads | Threading | Wraps platform-specific threading APIs. |
| CL-PPCRE | Regex | Perl-compatible regex by Edi Weitz. |
| Hunchentoot | Web server | Used in production CL web stacks. |
| Clack / Lack | Web abstraction | Rack/WSGI-style middleware layer. |
| CL-WHO | HTML generation | Macro-based HTML templating. |
| Parenscript | JS compilation | Translates CL-like code into JavaScript. |
| CFFI | FFI | Portable C interop. |
| Ironclad | Cryptography | Hashes, ciphers, MACs in pure CL. |
| Alexandria | Utilities | Standard "missing" utility library. |

## Standards process

Standardization went through three phases. The 1981 to 1984 design phase produced CLtL1. The 1986 to 1990 expansion phase added CLOS, conditions, and LOOP and produced CLtL2. The ANSI phase, conducted by subcommittee X3J13, produced ANSI X3.226-1994 ratified on December 8, 1994. X3J13's voting members included Steele, Weinreb, Moon, Fahlman, Gabriel, Pitman, Larry Masinter, Kim Barrett, William Clinger, Linda DeMichiel, Sandra Loosemore, Jon L White, Kiczales, and Pavel Curtis. Members included Apple, Bell Labs, DEC, Franz Inc., Harlequin, IBM, Lucid, MIT, Symbolics, Tartan Labs, Texas Instruments, and Xerox.[1][2][13]

*The Evolution of Lisp* by Gabriel and Steele (1993, ACM HOPL-II) is a candid history documenting the trade-offs behind the Lisp-2 design, the package system, and the absence of mandated tail calls.[1] No formal successor standard has appeared since 1994. Informal extensions include SLIME for editor integration, MOP support through closer-to-mop, and ASDF 3's package-inferred-system, but the language has been ANSI-frozen for three decades.

## Is Common Lisp still used today?

Common Lisp is no longer a mainstream production language but is alive in several niches. [Maxima](/wiki/maxima), the open-source successor of [MACSYMA](/wiki/macsyma), continues active development on GCL and SBCL. The ACL2 theorem prover, used to verify floating-point hardware at AMD and Centaur, is a Common Lisp program built on GCL.[25] Research groups use Common Lisp for robot control, including the CRAM framework at Bremen. The /r/lisp community, European Lisp Symposium, and International Lisp Conference are the main meeting points.

[Peter Seibel](/wiki/peter_seibel)'s *Practical Common Lisp* (Apress 2005), free online, is the standard modern introduction. Older books still in use include [Paul Graham](/wiki/paul_graham)'s *ANSI Common Lisp* (1995) and *On Lisp* (1993), Conrad Barski's *Land of Lisp* (2010), and Edi Weitz's *Common Lisp Recipes* (2015). Peter Norvig's *Paradigms of AI Programming* (1991) remains the canonical worked example of building classic AI systems in Common Lisp. Graham's essays "Beating the Averages" (2001) and "Revenge of the Nerds" (2002) reignited startup interest, citing his experience using Common Lisp at [Viaweb](/wiki/viaweb). Graham wrote that Lisp was "our secret weapon" and estimated that 20 to 25 percent of the Viaweb editor's source code was macros doing "things that you can't easily do in any other language."[39] The community is small: Common Lisp jobs number in the low hundreds globally, but salaries are high and codebases are unusually long-lived.[26][27][28]

## Influence on other languages

Common Lisp's design ideas appear, sometimes unaltered, in several later languages.

- **[Dylan](/wiki/dylan_programming_language)**, designed at Apple in 1992, started as a Common Lisp variant with infix syntax. It kept multiple dispatch, generic functions, and a CLOS-like object model.
- **[Clojure](/wiki/clojure)**, released by Rich Hickey in 2007, is closer to Common Lisp than to [Scheme](/wiki/scheme) in its standard library, `loop`-style sequence operations, and macros. Clojure innovates with persistent immutable data structures and software transactional memory, but the surface syntax and metaprogramming model are recognizably Common Lisp's.
- **[Julia](/wiki/julia)** (Bezanson, Karpinski, Shah, Edelman, 2012) took multiple dispatch and macros directly from CLOS. Bezanson has cited Common Lisp as a primary inspiration for the type system and dispatch model.[29]
- **Python's metaclass mechanism** descends conceptually from the CLOS metaobject protocol. The MOP also influenced aspect-oriented programming, which Kiczales went on to invent in AspectJ at Xerox PARC.[11]
- **Ruby and JavaScript** borrowed less directly but inherit features (closures, dynamic typing, eval) that Common Lisp had standardized first in mainstream form.

## Code example

A small program that exercises `defun`, `defclass`, generic functions, multiple dispatch, and a macro:

```
(defclass shape () ())

(defclass rectangle (shape)
  ((width  :initarg :width  :accessor width)
   (height :initarg :height :accessor height)))

(defclass circle (shape)
  ((radius :initarg :radius :accessor radius)))

(defgeneric area (s))

(defmethod area ((s rectangle))
  (* (width s) (height s)))

(defmethod area ((s circle))
  (* pi (expt (radius s) 2)))

(defgeneric overlaps-p (a b))

(defmethod overlaps-p ((a circle) (b circle))
  (format t "two circles~%"))

(defmethod overlaps-p ((a rectangle) (b circle))
  (format t "rect and circle~%"))

(defmacro with-area ((var shape) &body body)
  `(let ((,var (area ,shape))) ,@body))

(defun report (s)
  (with-area (a s)
    (format t "~A area ~,2F~%" (class-name (class-of s)) a)))
```

The example shows three constructs that set Common Lisp apart from mainstream languages: methods that dispatch on more than one argument, classes defined separately from generic functions, and macros that take a block of body code.

## See also

- [Lisp](/wiki/lisp), [Scheme](/wiki/scheme), [Clojure](/wiki/clojure), [Racket](/wiki/racket), [Emacs Lisp](/wiki/emacs_lisp), [Dylan](/wiki/dylan_programming_language), [Julia](/wiki/julia)
- [CLOS](/wiki/clos), [Metaobject protocol](/wiki/metaobject_protocol), [Multiple dispatch](/wiki/multiple_dispatch), [Multiple inheritance](/wiki/multiple_inheritance), [SBCL](/wiki/sbcl), [Quicklisp](/wiki/quicklisp), [ASDF](/wiki/asdf)
- [Guy Steele](/wiki/guy_steele), [Richard Gabriel](/wiki/richard_gabriel), [Kent Pitman](/wiki/kent_pitman), [Gregor Kiczales](/wiki/gregor_kiczales), [Peter Seibel](/wiki/peter_seibel), [Paul Graham](/wiki/paul_graham), [John McCarthy](/wiki/john_mccarthy), [Daniel Weinreb](/wiki/daniel_weinreb), [David Moon](/wiki/david_moon), [Scott Fahlman](/wiki/scott_fahlman)
- [ITA Software](/wiki/ita_software), [QPX](/wiki/qpx), [Google Flights](/wiki/google_flights), [Naughty Dog](/wiki/naughty_dog), [Andy Gavin](/wiki/andy_gavin), [Grammarly](/wiki/grammarly), [Cyc](/wiki/cyc), [MACSYMA](/wiki/macsyma), [Maxima](/wiki/maxima), [Viaweb](/wiki/viaweb), [Lisp machine](/wiki/lisp_machine), [Symbolics](/wiki/symbolics)
- [DARPA](/wiki/darpa), [AI Winter](/wiki/ai_winter), [Symbolic AI](/wiki/symbolic_ai), [Expert system](/wiki/expert_system), [S-expression](/wiki/s_expression), [Homoiconicity](/wiki/homoiconicity), [Lambda calculus](/wiki/lambda_calculus), [Garbage collection](/wiki/garbage_collection), [REPL](/wiki/repl), [Dynamic typing](/wiki/dynamic_typing)

## References

1. Steele, G. L., and Gabriel, R. P. (1993). "The Evolution of Lisp." HOPL-II, ACM. https://dl.acm.org/doi/10.1145/154766.155373
2. ANSI INCITS 226-1994 (R2004). "Programming Language, Common Lisp." https://webstore.ansi.org/standards/incits/ansiincits2261994r2004
3. Pitman, K. M. (1996). *Common Lisp HyperSpec*. http://www.lispworks.com/documentation/HyperSpec/Front/index.htm
4. Wikipedia. "Common Lisp." https://en.wikipedia.org/wiki/Common_Lisp
5. Bachrach, J., and Playford, K. (1999). *Dylan Programming*. Addison-Wesley. https://opendylan.org/books/dpg/
6. Bezanson, J., et al. (2017). "Julia: A Fresh Approach to Numerical Computing." *SIAM Review* 59(1). https://julialang.org/research/julia-fresh-approach-BEKS.pdf
7. Padget, J., et al. (1986). "Desiderata for the Standardization of Lisp." ACM LFP. https://dl.acm.org/doi/10.1145/319838.319860
8. Fahlman, S. E. "Spice Lisp publications." https://www.cs.cmu.edu/~sef/sefPubs.htm
9. Steele, G. L. (1984). *Common Lisp the Language* (1st ed.). Digital Press.
10. Bobrow, D. G., DeMichiel, L. G., Gabriel, R. P., Keene, S. E., Kiczales, G., and Moon, D. A. (1988). "Common Lisp Object System Specification." *SIGPLAN Notices* 23(SI). https://dl.acm.org/doi/10.1145/885631.885637
11. Kiczales, G., des Rivieres, J., and Bobrow, D. G. (1991). *The Art of the Metaobject Protocol*. MIT Press. https://mitpress.mit.edu/9780262610742/
12. Steele, G. L. (1990). *Common Lisp the Language* (2nd ed.). https://www.cs.cmu.edu/Groups/AI/html/cltl/cltl2.html
13. X3J13. (1994). "Draft Proposed ANS for Programming Language Common Lisp." https://www.iso-9899.info/wiki/CommonLisp
14. Pitman, K. M. (1996). "HyperSpec, Body section." http://www.lispworks.com/documentation/HyperSpec/Body/03_a.htm
15. SBCL contributors. "SBCL User Manual." http://www.sbcl.org/manual/
16. Gabriel, R. P., and Pitman, K. M. (1988). "Technical Issues of Separation in Function Cells and Value Cells." *Lisp and Symbolic Computation* 1(1). https://www.dreamsongs.com/Separation.html
17. Graham, P. (1993). *On Lisp*. Prentice Hall. https://www.paulgraham.com/onlisp.html
18. Lenat, D. B. (1995). "Cyc: A Large-Scale Investment in Knowledge Infrastructure." *CACM* 38(11). https://dl.acm.org/doi/10.1145/219717.219745
19. Gavin, A. (2011). "Making Crash Bandicoot, Part 6: GOOL and GOAL." https://all-things-andy-gavin.com/2011/03/12/making-crash-bandicoot-part-6/
20. Norvig, P. (2010). "Common Lisp at ITA Software." InfoQ. https://www.infoq.com/news/2010/07/Google-ITA/
21. ITA Software (archived). "Why Common Lisp?" https://web.archive.org/web/20100701000000*/itasoftware.com
22. Dyomkin, V., and Grammarly. (2014). "Running Lisp in Production." https://tech.grammarly.com/blog/running-lisp-in-production
23. Muscettola, N., et al. (1998). "Remote Agent." *Artificial Intelligence* 103. https://ti.arc.nasa.gov/m/profile/dpell/papers/MuscettolaNayakPellWilliamsAIJ98.pdf
24. Wikipedia. "Mirai (software)." https://en.wikipedia.org/wiki/Mirai_(software)
25. Kaufmann, M., Manolios, P., and Moore, J S. (2000). *Computer-Aided Reasoning: An Approach*. Kluwer. https://www.cs.utexas.edu/users/moore/acl2/
26. Seibel, P. (2005). *Practical Common Lisp*. Apress. https://gigamonkeys.com/book/
27. Graham, P. (2003). "Beating the Averages." https://paulgraham.com/avg.html
28. Norvig, P. (1991). *Paradigms of AI Programming*. Morgan Kaufmann. https://github.com/norvig/paip-lisp
29. Bezanson, J. (2012). "Why we created Julia." https://julialang.org/blog/2012/02/why-we-created-julia/
30. X3J13. "X3J13 (ANSI Common Lisp committee)." Wikipedia. https://en.wikipedia.org/wiki/X3J13
31. LispWorks. "1.9 Symbols in the COMMON-LISP Package." *Common Lisp HyperSpec*. https://www.lispworks.com/documentation/HyperSpec/Body/01_i.htm
32. McCarthy, J. (1960). "Recursive Functions of Symbolic Expressions and Their Computation by Machine, Part I." *CACM* 3(4). https://www-formal.stanford.edu/jmc/recursive.pdf
33. Wikipedia. "Steel Bank Common Lisp." https://en.wikipedia.org/wiki/Steel_Bank_Common_Lisp
34. Wikipedia. "Macsyma." https://en.wikipedia.org/wiki/Macsyma
35. Wikipedia. "SHRDLU." https://en.wikipedia.org/wiki/SHRDLU
36. Wikipedia. "Cyc." https://en.wikipedia.org/wiki/Cyc
37. Wikipedia. "AI winter." https://en.wikipedia.org/wiki/AI_winter
38. MIT OpenCourseWare. "Symbolics, Inc.: A failure of heterogeneous engineering." https://ocw.mit.edu/courses/6-933j-the-structure-of-engineering-revolutions-fall-2001/30eb0d06f5903c7a4256d397a92f6628_Symbolics.pdf
39. Graham, P. (2001). "Beating the Averages." https://www.paulgraham.com/avg.html

