# Common Lisp

**Common Lisp**是[Lisp](https://www.edgepedia.org/zh/lisp-programming-language)编程语言的一种标准化方言，由美国国家标准ANSI X3.226-1994《信息技术——编程语言——Common Lisp》定义，该标准于1994年12月定稿。<sup>[1](https://citeseerx.ist.psu.edu/document?doi=d8c6af4b5d56443c5ca7e92d34e3635e9d07d54c&repid=rep1&type=pdf)</sup><sup> • </sup><sup>[2](https://www.open-std.org/JTC1/SC22/WG11/docs/n462.pdf)</sup>它是一种大型的多范式语言，集成了对象系统、基于条件的错误处理设施，以及作用于Lisp源代码本身的宏系统。任何人都可以构建该语言的实现，但只有当实现遵循ANSI标准时，才被视为符合Common Lisp规范。<sup>[3](https://commonlisp.dev/gettingstarted/standard/)</sup>

| 关键事实 | 详情 |
|---|---|
| 标准 | ANSI X3.226-1994，1994年12月定稿；官方文件近1150页<sup>[1](https://citeseerx.ist.psu.edu/document?doi=d8c6af4b5d56443c5ca7e92d34e3635e9d07d54c&repid=rep1&type=pdf)</sup><sup> • </sup><sup>[3](https://commonlisp.dev/gettingstarted/standard/)</sup> |
| 参考文档 | Common Lisp HyperSpec（CLHS），即标准经LispWorks在ANSI许可下发布、由Kent Pitman起草的超链接HTML版本<sup>[3](https://commonlisp.dev/gettingstarted/standard/)</sup><sup> • </sup><sup>[4](https://so.parthpatel.net/common-lisp/doc/2900/ansi-common-lisp-the-language-standard-and-its-documentation/)</sup> |
| 数值 | 每个Common Lisp实现都有一种无界整数数据类型<sup>[2](https://www.open-std.org/JTC1/SC22/WG11/docs/n462.pdf)</sup> |
| 错误处理 | 建立在条件类层次结构之上的条件系统；错误是指在不干预的情况下程序无法正确继续正常执行的情形<sup>[5](https://www.cliki.net/site/HyperSpec/Body/sec_9-1.html)</sup> |
| 著名实现 | SBCL，源自CMUCL的纯编译器实现，使用保守的分代垃圾回收器<sup>[6](https://sbcl.sourceforge.io/manual/)</sup> |
| 符合性标记 | 标准的*FEATURES*列表带有一个标记，表明该规范已被ANSI采纳，且该实现声称符合规范<sup>[7](https://www.cs.cmu.edu/Groups/AI/html/hyperspec/HyperSpec/Body/var_stfeaturesst.html)</sup> |
| 开发风格 | 交互式、增量式开发；Common Lisp系统属于基于映像的编程环境，将代码和数据持久保存在单个文件中<sup>[8](https://arxiv.org/abs/2110.08993)</sup> |

## ANSI标准

该标准由一个标准委员会制定，其提案文档长达1350多页。Lisp社区的资深人物Kent Pitman修改了最终文档的书籍设计，以更好地利用垂直空间，因此出版的ANSI规范约为1150页，而核心文本与各草案基本相同。<sup>[3](https://commonlisp.dev/gettingstarted/standard/)</sup> ANSI持有官方标准的版权，该标准可以PDF形式从ANSI购买。<sup>[3](https://commonlisp.dev/gettingstarted/standard/)</sup><sup> • </sup><sup>[9](https://lisp-docs.github.io/docs/about/reference)</sup>

在最终版本达成一致之前，曾发布过一份进入公有领域的草案；草案系列包括dpANS1、dpANS2、dpANS3、dpANS3R和dpANS3R+。任何人都可以自由使用这些草案。除了HyperSpec和Franz Inc.的Allegro CL文档拥有明确的版权许可外，大多数语言规范项目都基于草案版本。<sup>[9](https://lisp-docs.github.io/docs/about/reference)</sup>

**在线阅读标准。** 最常用的HTML呈现版本是Common Lisp HyperSpec，由LispWorks提供，源自标准文档；它也可以下载供本地使用，开发环境通常允许查询Lisp符号的HyperSpec文档。<sup>[4](https://so.parthpatel.net/common-lisp/doc/2900/ansi-common-lisp-the-language-standard-and-its-documentation/)</sup> HyperSpec可免费阅读，但其版权不允许对其内容作任何更改，包括其外观和感觉。<sup>[3](https://commonlisp.dev/gettingstarted/standard/)</sup> 社区替代品包括源自公有领域草案提案的Novaspec，以及Common Lisp [Community](https://www.edgepedia.org/zh/community) Specs（CLCS），后者是社区根据草案对标准的再创作。<sup>[3](https://commonlisp.dev/gettingstarted/standard/)</sup>

## 语言特性

标准既从操作符预期使用情境中的行为来描述Common Lisp构造，也通过每个操作符规范中的“描述”和“异常情况”部分来描述其在所有其他情境中的行为。<sup>[5](https://www.cliki.net/site/HyperSpec/Body/sec_9-1.html)</sup>

**条件系统。** 条件是表示求值过程中检测到的特定情境的对象；条件是`condition`类的广义实例，带有与该情境相关的数据槽，并构成一个已定义的条件类层次结构。该层次结构包括`error`、`warning`、`type-error`、`division-by-zero`、`unbound-variable`、`undefined-function`、`file-error`和`serious-condition`等类。`ccase`、`ecase`、`check-type`和`assert`等宏可以隐式地创建并发出条件信号。<sup>[5](https://www.cliki.net/site/HyperSpec/Body/sec_9-1.html)</sup><sup> • </sup><sup>[10](https://lisp-docs.github.io/cl-language-reference/chap-9/j-b-condition-system-concepts)</sup>

**数值。** 该语言的数值规定包括任意精度整数：每个Common Lisp实现都有一种无界整数数据类型。<sup>[2](https://www.open-std.org/JTC1/SC22/WG11/docs/n462.pdf)</sup>

**标准化标记。** 实现的*FEATURES*列表可以表明符合性声明，其中包括一个标记，用于声称符合1984年规范《Common Lisp: The Language》的实现，另一个标记则表明ANSI规范已被采纳且该实现声称符合该规范。<sup>[7](https://www.cs.cmu.edu/Groups/AI/html/hyperspec/HyperSpec/Body/var_stfeaturesst.html)</sup>

## 实现

由于标准定义的是语言而非单一产品，因此存在多种实现。Steel Bank Common Lisp（SBCL）源自CMUCL，并在一个重要的方面与之分道扬镳：SBCL现在本质上是一种纯编译器实现。这利用了标准赋予的自由，即执行设施可以共享相同的执行策略，而且这对普通用户基本上是不可见的，因为SBCL仍然通过即时编译以交互方式执行代码；这一变化可以通过`compiled-function-p`等看到，它意味着SBCL缺少许多在解释执行与编译执行中行为不同的缺陷。<sup>[6](https://sbcl.sourceforge.io/manual/)</sup>

SBCL由两个组件实现：一个用C编写的底层运行时环境，提供底层服务并加载Lisp `.core`文件；以及一个用Common Lisp本身编写的高层系统。垃圾回收使用保守的分代垃圾回收器，它与其他架构特性一起继承自CMUCL；在某些架构上，这种分代设计具有被描述为对性能大多有利的影响。<sup>[6](https://sbcl.sourceforge.io/manual/)</sup>

## 性能

Common Lisp是一种非常庞大的语言，这使得评估实现各个方面的性能变得困难；cl-bench基准测试套件指出，唯一真正的基准是自己的应用程序，因为代表性代码只能有限地覆盖现实生活中的程序。<sup>[11](https://cl-bench.common-lisp.dev/)</sup> 在跨多种语言的社区速度比较中，SBCL被描述为能够提供出色的性能。<sup>[12](https://github.com/kaitenague/speed-tests)</sup> 在比较性能时，基准测试集合将Common Lisp、[Scheme](https://www.edgepedia.org/zh/scheme-programming-language)和Clojure衍生运行时与其他动态JIT语言运行时分开归类。<sup>[13](https://hara-lang.org/benchmarks/)</sup>

## 应用

Common Lisp的商业和研究用途涵盖广泛领域。商业供应商LispWorks记录了多种应用，包括火灾时协助公众从隧道疏散、法证指纹收集与分析、实时股票交易、交互式语音应答、导弹防御中的信号处理、航空航天业的自动化测试、基因组学、符号生物计算、自然语言处理、飞机分析软件，以及动态化工流程模拟器等，还有许多商业、工业和学术研究中的应用。<sup>[14](https://www.lispworks.com/success-stories/)</sup>

## 与其他Lisp语言的关系

Common Lisp是Lisp方言家族中的一种语言。新的“Lisp风格”语言定期被创造出来，但除非它们遵循ANSI标准，否则它们不是Common Lisp。<sup>[3](https://commonlisp.dev/gettingstarted/standard/)</sup>

## References

1. ["Can a 40 year old Computer Language..." (on the X3.226 ANSI standard, finalized December 1994), CiteSeerX](https://citeseerx.ist.psu.edu/document?doi=d8c6af4b5d56443c5ca7e92d34e3635e9d07d54c&repid=rep1&type=pdf)
2. [ISO/IEC FCD 10967-2.4 committee draft (citing ANSI X3.226-1994 and unbounded integers), Open-Std.org](https://www.open-std.org/JTC1/SC22/WG11/docs/n462.pdf)
3. [The Common Lisp Standard, CommonLisp.dev](https://commonlisp.dev/gettingstarted/standard/)
4. [ANSI Common Lisp, the language standard and its documentation, SO Documentation](https://so.parthpatel.net/common-lisp/doc/2900/ansi-common-lisp-the-language-standard-and-its-documentation/)
5. [CLHS Section 9.1: Condition System Concepts, CLiki mirror](https://www.cliki.net/site/HyperSpec/Body/sec_9-1.html)
6. [SBCL 2.6.9 User Manual](https://sbcl.sourceforge.io/manual/)
7. [CLHS: Variable \*FEATURES\*, CMU AI Repository mirror](https://www.cs.cmu.edu/Groups/AI/html/hyperspec/HyperSpec/Body/var_stfeaturesst.html)
8. [Typed Image-based Programming with Structure Editing, arXiv](https://arxiv.org/abs/2110.08993)
9. [About the Technical Reference, Common Lisp Docs](https://lisp-docs.github.io/docs/about/reference)
10. [9.1 Condition System Concepts, Common Lisp Language Reference](https://lisp-docs.github.io/cl-language-reference/chap-9/j-b-condition-system-concepts)
11. [cl-bench benchmarks](https://cl-bench.common-lisp.dev/)
12. [speed-tests: comparing execution speeds of various programming languages, GitHub](https://github.com/kaitenague/speed-tests)
13. [Hara Benchmarks](https://hara-lang.org/benchmarks/)
14. [LispWorks Success Stories](https://www.lispworks.com/success-stories/)

---
*Initially written Sep 17, 2026 · Reviewed: Sep 30, 2026; Oct 15, 2026 · Edited: Oct 15, 2026 · Last review: Oct 15, 2026*

Topic: 技术与人造世界 › 计算技术与数字系统 › 软件与编程 › Programming languages › Individual programming languages › Functional, logic, and array languages

Copyright 2026 Edgepedia

License: Edgepedia Community License 1.0, https://www.edgepedia.org/edgepedia/license

Source: https://www.edgepedia.org/zh/common-lisp

English original: https://www.edgepedia.org/common-lisp
