Common Lisp
The standardized, multi-paradigm Lisp dialect with powerful macros, CLOS object system, and industrial-strength implementations
Created by Guy Steele, Scott Fahlman, Richard Gabriel, David Moon, Daniel Weinreb, et al.
Common Lisp is the ANSI-standardized dialect of the Lisp programming language family, designed to be a powerful, industrial-strength language that combines multiple programming paradigms with unique features like macros that can transform the language itself. It represents the culmination of decades of Lisp development, unifying several incompatible dialects into a single comprehensive standard.
History & Origins
The story of Common Lisp begins with the fragmentation crisis of the early 1980s. By then, Lisp had evolved into numerous incompatible dialects: MIT’s Maclisp, Xerox’s Interlisp, Symbolics’ ZetaLisp, and others. Each had devotees, each had incompatible code, and the fragmentation threatened Lisp’s future.
In 1981, DARPA manager Bob Engelmore initiated a project to create a unified dialect. The effort brought together luminaries from across the Lisp world:
- Guy Steele - Scheme co-creator and prolific language designer
- Scott Fahlman - CMU AI researcher and connectionist pioneer
- Richard Gabriel - Lucid Inc. founder, later wrote influential “Worse Is Better” essay
- David Moon - Symbolics Lisp Machine architect
- Daniel Weinreb - Symbolics co-founder
Most of the language design happened via email - one of the earliest examples of internet-based collaborative software development. The result was published in 1984 as “Common Lisp: The Language” (CLtL), a 465-page specification that defined the language.
The ANSI Standardization
The X3J13 committee refined CLtL through a public consensus process, resulting in the ANSI X3.226-1994 standard. This process added crucial features:
- CLOS (Common Lisp Object System) - A sophisticated object system with multiple inheritance and metaobject protocol
- Conditions - A powerful error handling system
- Packages - Namespacing for symbols
- Loop - An extensive iteration macro
The 1994 ANSI standard reportedly made Common Lisp the first ANSI-standardized object-oriented programming language, predating the C++ standard (1998) and Ada 95.
Core Features
The Macro System
Common Lisp’s macros are fundamentally different from C preprocessor macros. They’re programs that generate programs, operating on the code’s abstract syntax tree:
| |
This enables domain-specific languages, compiler extensions, and abstraction patterns impossible in other languages.
CLOS - The Object System
CLOS introduced concepts still considered advanced today:
- Multiple Dispatch - Methods can specialize on any argument, not just the first
- Multiple Inheritance - Clean composition of behaviors
- Metaobject Protocol (MOP) - The object system is itself programmable
- Method Combinations -
:before,:after,:aroundmethods for aspect-oriented programming
Dynamic Nature
Common Lisp is deeply dynamic:
- Runtime Compilation - Compile and load code while running
- Restarts - Error handlers that can resume execution
- Image-based Development - Save and restore entire program state
- Interactive Development - Change running programs without restart
The Condition System
Unlike exceptions in most languages, Common Lisp’s condition system separates error detection from error handling, allowing decisions to be made at any level of the call stack.
Modern Implementations
Steel Bank Common Lisp (SBCL)
The most popular open-source implementation, SBCL offers:
- Native code compilation with excellent performance
- Precise garbage collection
- Extensive type inference
- Active development and community
Other Implementations
- CCL (Clozure CL) - Fast compilation, native threads
- ECL (Embeddable CL) - Compiles to C, embeddable in applications
- CLISP - Bytecode compiler, excellent for scripting
- LispWorks - Commercial, with GUI builder and profiler
- Allegro CL - Commercial, used in production AI systems
The Quicklisp Revolution
In 2010, Zach Beane created Quicklisp, a package manager that transformed Common Lisp development. Before Quicklisp, using libraries required manual downloading and configuration. Now:
| |
Quicklisp provides access to over 1,500 libraries and has dramatically lowered the barrier to entry for new developers.
Industry Applications
Aerospace
NASA’s Jet Propulsion Laboratory used Common Lisp for the Remote Agent Experiment on Deep Space 1, which autonomously controlled a spacecraft. The ability to debug and modify running code from millions of miles away proved invaluable.
Travel Industry
ITA Software built QPX, a flight search engine that powered Google Flights, Kayak, and other major travel sites, in Common Lisp. The language’s optimization capabilities and rapid development cycle were key advantages.
Artificial Intelligence
Common Lisp’s heritage in AI research continues. Its symbolic computation capabilities, dynamic nature, and macro system make it well-suited for:
- Knowledge representation
- Natural language processing
- Expert systems
- Machine learning prototyping
Why Common Lisp Still Matters
Unmatched Expressiveness
The macro system allows abstractions that compress hundreds of lines into dozens, while remaining readable and maintainable.
Stable Foundation
The ANSI standard has remained unchanged since 1994. Code written 30 years ago still runs today - a remarkable achievement in software.
Performance
Modern implementations like SBCL compile to native machine code and can achieve performance approaching that of C for numeric and compute-intensive workloads, while retaining dynamic language flexibility.
Interactive Development
REPL-driven development, where you can modify running systems, inspect and change state, and test code immediately, provides productivity benefits that compensate for the smaller ecosystem.
The Community Today
Common Lisp has a smaller but dedicated community:
- Reddit - r/lisp and r/Common_Lisp
- Discord - Active Lisp Discord servers
- Planet Lisp - Blog aggregator
- European Lisp Symposium - Annual academic conference
- Lisp Game Jam - Regular game development events
The community values depth over breadth, with practitioners often having decades of experience.
Learning Curve
Common Lisp has a reputation for difficulty, but much of this comes from:
- Unfamiliar syntax - Parentheses and prefix notation take adjustment
- Different concepts - Macros, conditions, and CLOS require new thinking
- Ecosystem navigation - Finding the right libraries and idioms
However, the core language is elegant and consistent. Once the initial hurdles are passed, many find it the most productive language they’ve used.
Modern Common Lisp
While the language standard is frozen, the ecosystem evolves:
- Roswell - Multi-implementation manager and script runner
- ASDF - Universal build system
- Ultralisp - Rapid library distribution
- cl-cookbook - Community documentation project
- Coalton - Statically typed embedded language
Common Lisp demonstrates that languages can remain relevant and practical long after standardization, provided the foundation is solid and the community remains engaged.
Timeline
Notable Uses & Legacy
NASA JPL
Used Common Lisp for Deep Space 1 Remote Agent autonomous spacecraft control and mission planning systems.
ITA Software (Google Flights)
Built QPX, the flight search engine powering Google Flights, Kayak, and Orbitz in Common Lisp for its optimization capabilities.
Grammarly
Core natural language processing engine was originally built in Common Lisp for rapid AI development and iteration.
ICAD
Knowledge-based engineering system built on Common Lisp, used by Boeing for 777 component design automation and by Airbus for aircraft development.
Maxima
Open-source computer algebra system written in Common Lisp, descended from the original Macsyma system developed at MIT in the 1960s.
Cyc Project
One of the longest-running AI projects, building a comprehensive knowledge base of common sense reasoning, originally built on Common Lisp since 1984 and now using SubL, a Common Lisp variant.
Language Influence
Influenced By
Influenced
Running Today
Run examples using the official Docker image:
docker pull clfoundation/sbcl:latestExample usage:
docker run --rm -v $(pwd):/app -w /app clfoundation/sbcl:latest sbcl --script hello.lisp