# Squeak（编程语言）

**Squeak** 是一个现代的开源 [Smalltalk](https://www.edgepedia.org/zh/smalltalk) 编程系统，是 Smalltalk-80 的直接后裔，其语言和大部分核心类库与后者完全相同：对象、类、单继承、块、垃圾回收、集合、流，以及模型-视图-控制器<sup>[1](https://squeak.org/)</sup><sup> • </sup><sup>[2](https://wiki.squeak.org/squeak/1823)</sup>。它由苹果电脑公司的一支团队创造，团队成员包括许多原 Smalltalk-80 开发者；其虚拟机用 Smalltalk 的一个子集编写，再翻译成 C 以获得实用性能<sup>[3](https://archive.esug.org/HistoricalDocuments/Squeak/OOPSLA.Squeak.html)</sup>。Squeak 以 Morphic 用户界面框架为特色，可在所有主流平台上运行，已被用于教育、多媒体、游戏、研究和商业领域<sup>[1](https://squeak.org/)</sup>。

| 关键事实 | 详情 |
|---|---|
| 起源 | 由 Dan Ingalls、Ted Kaehler、John Maloney、Scott Wallace 和 Alan Kay 在苹果电脑公司创造；1996 年 9 月发布到互联网，1996 年 10 月 1 日由 Ingalls 在 comp.lang.smalltalk 上宣布<sup>[3](https://archive.esug.org/HistoricalDocuments/Squeak/OOPSLA.Squeak.html)</sup><sup> • </sup><sup>[4](https://wiki.squeak.org/squeak/1985)</sup> |
| 自举 | 虚拟机用 Smalltalk 的一个子集编写；一个翻译器生成等效的 C 程序，性能与商业 Smalltalk 相当<sup>[3](https://archive.esug.org/HistoricalDocuments/Squeak/OOPSLA.Squeak.html)</sup> |
| 语言 | 语言和大部分核心类库与 Smalltalk-80 相同；不完全符合 ANSI Smalltalk 标准<sup>[2](https://wiki.squeak.org/squeak/1823)</sup> |
| 许可证 | 原始许可证授予免版税的商业使用权，仅要求移植和对基类库的修改在互联网上免费提供<sup>[3](https://archive.esug.org/HistoricalDocuments/Squeak/OOPSLA.Squeak.html)</sup> |
| 当前版本 | Squeak 6.1，于 2026 年 8 月 10 日宣布，自上一版本以来合并了 1700 多个补丁和 9000 多处方法变更<sup>[5](https://squeak.org/release_notes/6.1/)</sup> |
| 虚拟机 | OpenSmalltalk 虚拟机（Cog）是 Squeak 和 Cuis 的基础；Cog 虚拟机增加了即时编译器，自 Squeak 5.0 起使用 Spur 对象表示<sup>[6](https://github.com/OpenSmalltalk/opensmalltalk-vm)</sup> |
| 教育 | Squeak Etoys 是一个构建在 Squeak 之上的媒体丰富的创作环境，经过为期两年的努力，于 2008 年 9 月适配到“每个孩子一台笔记本电脑”项目的 XO 笔记本电脑上<sup>[7](https://tinlizzie.org/VPRIPapers/tr2009001_etoys4olpc.pdf)</sup> |

## 历史

**在苹果的起源。** 1995 年，苹果电脑公司的一个小组——由 [Alan Kay](https://www.edgepedia.org/zh/alan-kay)、Dan Ingalls 和 Ted Kaehler 组成——着手构建一个他们能够完全控制的 Smalltalk<sup>[8](https://citeseerx.ist.psu.edu/document?doi=50725b3f3df83f2b59076cdd6cdc1de14d319ff9&repid=rep1&type=pdf)</sup>。描述该系统的 OOPSLA 论文记载，当时可用的 Smalltalk 实现都无法让他们获得想要的对图形、声音和 Smalltalk 引擎本身的控制权，也无法自由地在互联网上移植和分发这项工作<sup>[3](https://archive.esug.org/HistoricalDocuments/Squeak/OOPSLA.Squeak.html)</sup>。团队从 Smalltalk-80 的蓝皮书规范开始，加入了一个带增量压缩垃圾回收的 32 位直接指针对象内存，并编写了一个从 Smalltalk 子集到 C 的翻译器<sup>[4](https://wiki.squeak.org/squeak/1985)</sup>。

Squeak 于 1996 年 9 月发布到互联网；Dan Ingalls 在 1996 年 10 月 1 日的一篇 comp.lang.smalltalk 帖子中公开宣布了它，称其为“一个翻新的 Smalltalk-80 系统，源自苹果早期的 ST-80 发行版”<sup>[3](https://archive.esug.org/HistoricalDocuments/Squeak/OOPSLA.Squeak.html)</sup><sup> • </sup><sup>[4](https://wiki.squeak.org/squeak/1985)</sup>。一个月后，Stephen Travis Pope 在 squeak@create.ucsb.edu 上启动了一个单独的邮件列表<sup>[4](https://wiki.squeak.org/squeak/1985)</sup>。

**快速移植。** 最初的版本只能在 Macintosh 上运行。发布三周后，Ian Piumarta 宣布了第一个 UNIX 移植版，两周后又将其移植到另外七个 UNIX 平台；与此同时，Andreas Raab 宣布了 [Windows 95](https://www.edgepedia.org/zh/windows-95) 和 [Windows NT](https://www.edgepedia.org/zh/windows-nt) 的移植版。两人在开始之前都没有联系过团队。发布五周后，Squeak 已可在除 [Windows 3.1](https://www.edgepedia.org/zh/windows-3-1) 以外的所有主流计算平台上使用<sup>[3](https://archive.esug.org/HistoricalDocuments/Squeak/OOPSLA.Squeak.html)</sup>。

**离开苹果之后。** Squeak 监督委员会协调社区对该环境的开源开发<sup>[1](https://squeak.org/)</sup>。

## 自举虚拟机

Squeak 的决定性实现选择是虚拟机本身用 Smalltalk 编写。OOPSLA 论文描述了这一策略：用 Smalltalk 编写和调试动态翻译器及其目标代码序列，然后自动将它们翻译成 C 来构建生产虚拟机，并使用现有的 Smalltalk 进行引导，直到 Squeak 能够调试并生成自己的虚拟机<sup>[3](https://archive.esug.org/HistoricalDocuments/Squeak/OOPSLA.Squeak.html)</sup>。由于虚拟机是普通的 Smalltalk 代码，因此很容易在运行中的系统内部进行调试、分析和修改<sup>[3](https://archive.esug.org/HistoricalDocuments/Squeak/OOPSLA.Squeak.html)</sup>。

Slang 是 Smalltalk 的一个子集，作为实现虚拟机核心的语言，VMMaker 提供一个翻译器，将此 Slang 转换为 C 代码；然后生成的源代码与平台支持代码结合，产生为每个平台量身定制的虚拟机<sup>[9](https://wiki.squeak.org/squeak/2211)</sup>。复合源代码维护在 GitHub 上的 OpenSmalltalk（Cog）仓库中，构建出的版本在 Windows、macOS 和 Linux 上接受自动测试<sup>[6](https://github.com/OpenSmalltalk/opensmalltalk-vm)</sup>。

Cog 虚拟机家族有多个变体。Stack 虚拟机是纯解释器，将方法激活保留在栈上；Cog 虚拟机增加了一个即时编译器，将常用的方法翻译成机器码；Sista 虚拟机仍在开发中，增加了带有推测性内联的自适应优化。自 Squeak 5.0 起使用的 Spur 对象表示提供了分代清扫、用于快速 become 的惰性转发、32 位和 64 位版本共享的单一对象头格式，以及可增长和收缩的分段堆<sup>[6](https://github.com/OpenSmalltalk/opensmalltalk-vm)</sup>。

原始设计还包括一种紧凑的对象格式，通常每个对象只需要一个字的开销；一个用于 32 位直接指针的增量垃圾回收器；BitBlt 的扩展，以处理任意深度的颜色并支持抗锯齿图像旋转和缩放；以及完全用 Smalltalk 编写的实时声音和音乐合成<sup>[3](https://archive.esug.org/HistoricalDocuments/Squeak/OOPSLA.Squeak.html)</sup>。

## 语言与环境

Squeak 的语言和大部分核心类库与 Smalltalk-80 相同，不过类库此后已大幅扩展。ANSI Smalltalk 是该语言公认的标准，虽然 Squeak 在精神上是 Smalltalk，但并不完全符合该标准<sup>[2](https://wiki.squeak.org/squeak/1823)</sup>。

该环境基于镜像，且是活态的：用于浏览、搜索和编写代码的工具与正在开发的程序一起运行，运行时信息可在并发调试会话中获得，代码可直接更新<sup>[1](https://squeak.org/)</sup>。Morphic 框架是 Squeak 引入的一种图形模型，促进了低成本的图形化交互式应用程序开发和维护<sup>[1](https://squeak.org/)</sup><sup> • </sup><sup>[10](https://wiki.squeak.org/squeak/uploads/SqueakBOOK.pdf)</sup>。自动变更跟踪和分布式源代码版本控制工具是内置的<sup>[1](https://squeak.org/)</sup>。

## Etoys 与教育

Squeak Etoys 是一个媒体丰富的创作环境，具有脚本化对象模型，构建在 Squeak 之上，提供实时声音、音乐合成、图像处理和互联网访问<sup>[11](https://periodicos2.uesb.br/index.php/praxis/article/view/727)</sup>。Etoys 模仿 Self 语言，提供了一个界面，开发者可以拖放直接操作视觉对象的代码，这与需要严格分离 GUI 和底层模型的基于文本的语言形成对比<sup>[12](https://www.researchgate.net/publication/221338148_Idioms_for_Composing_Games_with_EToys)</sup>。

Etoys 通过“每个孩子一台笔记本电脑”项目进行了大规模的教育部署。从 2006 年 9 月开始，由 Alan Kay 领导的视点研究所团队花了两年时间将现有的 Squeak Etoys 适配到 XO 笔记本电脑及其 Sugar 界面，并于 2008 年 9 月发布了一个大幅改进的版本<sup>[7](https://tinlizzie.org/VPRIPapers/tr2009001_etoys4olpc.pdf)</sup>。基于 Squeak 的环境也被用于年仅十岁的大学前学生<sup>[13](https://peer.asee.org/programming-for-pre-college-education-using-squeak-smalltalk.pdf)</sup>。

## 分支与生态系统

Squeak 衍生出了几个后代。[Pharo](https://www.edgepedia.org/zh/pharo) 是一种广泛用于研究和工业界的 Smalltalk，自 2008 年以来从 Squeak 演变而来，其反射 API 在此过程中与原始 Smalltalk 反射 API 产生了分歧<sup>[14](https://www.sciencedirect.com/science/article/abs/pii/S2590118424000170)</sup>。Cuis 是另一种在相同 OpenSmalltalk 虚拟机上运行的 Smalltalk 方言<sup>[6](https://github.com/OpenSmalltalk/opensmalltalk-vm)</sup>。Squeak 版本历史还记录了其时间线上某处的 Cuis 分支和 Pharo 分支<sup>[15](https://wiki.squeak.org/squeak/SqueakVersions)</sup>。

## 当前版本

Squeak 6.0 于 2022 年 7 月发布，是第一个在所有主流平台上支持高分辨率显示的 Squeak，通过改进的 TrueType 字体支持实现了灵活的 UI 缩放因子；它捆绑了最新的 OpenSmalltalk 虚拟机，其镜像默认使用新的 SistaV1 字节码集<sup>[16](https://squeak.org/release_notes/6.0/)</sup>。

Squeak 6.1 于 2026 年 8 月 10 日在邮件列表上宣布，被命名为“Vanessa”，以纪念 Vanessa Freudenberg（1972-2025）。自四年前的上一个版本以来，合并了 1700 多个补丁和 9000 多处方法变更。亮点包括用于导航类和类别的新树形浏览器、Objectland（“Squeak 的世界”）的回归，以及用于模拟、展开和调度进程的内核基础设施的变更；该版本包含 5800 多个测试，在项目的持续集成上运行时间不到 3 分钟<sup>[5](https://squeak.org/release_notes/6.1/)</sup>。提供适用于 macOS、Windows（x64 和 ARMv8）以及 Linux（x64 和 ARMv8）的版本下载，Squeak 6.1 还可以通过 SqueakJS（一个基于浏览器的 Smalltalk 虚拟机）在浏览器中试用<sup>[1](https://squeak.org/)</sup>。社区在 2026 年庆祝了 Squeak 的 30 岁生日<sup>[17](https://news.squeak.org/)</sup>。

## References

1. [Squeak/Smalltalk, official website](https://squeak.org/)
2. [Smalltalk, Squeak Wiki](https://wiki.squeak.org/squeak/1823)
3. [Ingalls, D., Kaehler, T., Maloney, J., Wallace, S., Kay, A. "Back to the Future: The Story of Squeak, A Practical Smalltalk Written in Itself," OOPSLA 1997](https://archive.esug.org/HistoricalDocuments/Squeak/OOPSLA.Squeak.html)
4. [The birth of Squeak, Squeak Wiki](https://wiki.squeak.org/squeak/1985)
5. [Squeak 6.1 Release Notes](https://squeak.org/release_notes/6.1/)
6. [OpenSmalltalk/opensmalltalk-vm, GitHub](https://github.com/OpenSmalltalk/opensmalltalk-vm)
7. [Ohshima, T. et al. "Etoys for One Laptop per Child," VPRI Technical Report TR-2009-001](https://tinlizzie.org/VPRIPapers/tr2009001_etoys4olpc.pdf)
8. [A Computer-Aided ... (paper citing Squeak's 1995 Apple origins and September 1996 release), CiteSeerX](https://citeseerx.ist.psu.edu/document?doi=50725b3f3df83f2b59076cdd6cdc1de14d319ff9&repid=rep1&type=pdf)
9. [Building the VM, Squeak Wiki](https://wiki.squeak.org/squeak/2211)
10. [SqueakBOOK (chapter on Squeak and Smalltalk, Morphic)](https://wiki.squeak.org/squeak/uploads/SqueakBOOK.pdf)
11. [Neves, Y. P. C. S., Mercado, L. P. L. "O uso e a apropriação do Squeak Etoys por professores e alunos do projeto uca," Práxis Educacional](https://periodicos2.uesb.br/index.php/praxis/article/view/727)
12. [Idioms for Composing Games with EToys, ResearchGate](https://www.researchgate.net/publication/221338148_Idioms_for_Composing_Games_with_EToys)
13. [Programming For Pre College Education Using Squeak Smalltalk, ASEE](https://peer.asee.org/programming-for-pre-college-education-using-squeak-smalltalk.pdf)
14. [Pharo: A reflective language, Analyzing the reflective API, ScienceDirect](https://www.sciencedirect.com/science/article/abs/pii/S2590118424000170)
15. [Squeak Versions, Squeak Wiki](https://wiki.squeak.org/squeak/SqueakVersions)
16. [Squeak 6.0 Release Notes](https://squeak.org/release_notes/6.0/)
17. [The Weekly Squeak (Happy 30th Birthday to Squeak!)](https://news.squeak.org/)

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

Topic: 技术与人造世界 › 计算技术与数字系统 › 软件与编程 › Programming languages › Individual programming languages › C-family and imperative languages

Copyright 2026 Edgepedia

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

Source: https://www.edgepedia.org/zh/squeak-programming-language

English original: https://www.edgepedia.org/squeak-programming-language
