# Wolfram 语言

**Wolfram 语言**是由 [Wolfram Research](https://www.edgepedia.org/zh/wolfram-research) 开发的一种符号式编程语言，其中的数据、公式、代码、图形、文档和界面均表示为符号表达式。它于 1988 年作为 Mathematica 计算机代数系统的语言首次发布，此后扩展为一种通用计算语言，用于 Mathematica、Wolfram|One、Wolfram|Alpha Notebook Edition 和 Wolfram Cloud 等 Wolfram 产品。<sup>[1](https://wolfram.com/language/?source=home)</sup><sup> • </sup><sup>[2](https://reference.wolfram.com/language/guide/Expressions.html.en)</sup>

| 关键事实 | 详情 |
|---|---|
| 首次发布 | 随 Mathematica 一同发行，1988 年 6 月 23 日推出<sup>[1](https://wolfram.com/language/?source=home)</sup><sup> • </sup><sup>[3](https://www.youtube.com/watch?v=HxWg8exJxNY)</sup> |
| 核心表示 | 一切对象，包括数据、程序、公式、图形和文档，都是符号表达式<sup>[2](https://reference.wolfram.com/language/guide/Expressions.html.en)</sup> |
| 内置函数 | 完整系统包含 6,000 多个内置函数，覆盖各个计算领域<sup>[4](https://wolfram.com/language/core-areas/user-interfaces/?source=home)</sup> |
| 当前版本 | Wolfram 15.0，需要 x86-64-v2 或 Apple Silicon，建议 4 GB 以上内存，含本地文档需 23 GB 磁盘空间（不含文档为 10 GB）<sup>[5](https://www.wolfram.com/desktop/system-requirements/)</sup> |
| 免费获取 | 面向开发者的免费 Wolfram 引擎允许开发和非商业用途，但不得用于生产应用<sup>[6](https://www.wolfram.com/legal/terms/wolfram-engine.html)</sup> |
| 文档 | 在线文档超过 10,000 页<sup>[7](https://www.scc.kit.edu/en/products/mathematica.php)</sup> |

## 符号表达式

该语言的统一理念是：它所处理的一切对象都是符号表达式。诸如 {x, y, z} 这样的列表，在内部是表达式 List[x, y, z]，只是以括号记法显示；像 f[x, y] 这样未附加定义的表达式，求值结果就是它自身。这一单一表示涵盖了数、公式、图像、地理多边形、分子和笔记本文件，并构成了该语言符号式编程范式的基础。<sup>[2](https://reference.wolfram.com/language/guide/Expressions.html.en)</sup><sup> • </sup><sup>[8](https://www.wolfram.com/language/elementary-introduction/2nd-ed/33-expressions-and-their-structure.html)</sup>

由于未定义的符号本身就是合法表达式，程序员可以操作没有赋值的变量，让它们参与代数和函数式计算，直到进行数值替换为止。<sup>[9](https://wolfram.com/language/fast-introduction-for-programmers/en/symbolic-expressions/)</sup>

## 求值模型

该语言执行的基本操作是求值。每当输入一个表达式，系统就应用它所知道的定义——包括内置定义和用户定义——直到结果不再变化，然后返回该结果。如果再把结果作为输入重新输入，它会再次求值为自身，除非出现受控的无限求值。<sup>[10](https://reference.wolfram.com/language/tutorial/EvaluationOfExpressions.html)</sup>

求值也是程序执行的方式：由条件语句和循环构成的程序，通过依次求值这些表达式来运行。Trace 函数会暴露中间步骤，生成一个包含求值某表达式所用全部表达式的列表，并可按模式筛选。<sup>[10](https://reference.wolfram.com/language/tutorial/EvaluationOfExpressions.html)</sup>

**模式匹配。** 求值与模式匹配密切互动。模式通常与至少已部分求值的表达式进行匹配，因此模式本身会先被求值。HoldPattern 结构使模式的某部分保持未求值，同时在匹配意义上仍与之等价，从而使模式能作用于被保持的、未求值的表达式。<sup>[10](https://reference.wolfram.com/language/tutorial/EvaluationOfExpressions.html)</sup>

## 函数式编程

该语言提供了一组函数式结构，用于将函数并行应用于列表及其他表达式的元素：Map（/@）、Apply（@@）、MapApply（@@@）、MapIndexed、MapAt、Scan 及相关函数。数学函数自动具有“可列表化”属性，即它们总是作用于列表的每个元素。<sup>[11](https://reference.wolfram.com/language/guide/ApplyingFunctionsToLists.html.en?source=footer)</sup>

纯函数用 & 记法书写，无需命名即可定义函数；# 代表第一个参数，## 代表所有参数，##n 代表第 n 个及其后的参数。& 记法的优先级较低，因此像 #1+#2& 这样的表达式无需括号，但把选项设为纯函数时则需要括号。<sup>[12](https://reference.wolfram.com/language/tutorial/FunctionalOperations.html?view=all)</sup>

## 笔记本与部署

Wolfram 开创了计算笔记本范式，笔记本至今仍是主要界面：结构化的交互式文档，可包含文本、排版表达式、图形、声音、计算和用户界面元素。<sup>[13](https://www.wolfram.com/technologies/nb/index.en.html?footer=lang)</sup> 笔记本可在桌面、云端、移动端和浏览器部署之间迁移，已发布的云笔记本保持完全可交互，由实时计算驱动，而非预先计算的结果。<sup>[14](https://www.wolfram.com/notebooks/?source=home)</sup>

Wolfram 通用部署系统可自动将同一份 Wolfram 语言代码部署到桌面、云端、网页和移动目标，Wolfram Cloud 则在网页浏览器中提供完整的交互式笔记本。<sup>[15](https://wolfram.com/universal-deployment-system/?source=home)</sup>

## 互操作性

版本 12 引入了从该语言内部直接调用 Python 和 NodeJS 的功能，并提供用于嵌入外部代码的笔记本单元类型。ExternalEvaluate["Python", code] 执行 Python 代码并将结果作为 Wolfram 语言表达式返回，类型转换会把 Python 的列表、元组、集合和字符串映射到相应的 Wolfram 类型；不支持的可调用 Python 类型返回 ExternalFunction，其他不支持的类型返回 ExternalObject。<sup>[16](https://www.wolfram.com/language/12/external-system-integration/?product=mathematica)</sup><sup> • </sup><sup>[17](https://reference.wolfram.com/language/ref/externalevaluationsystem/Python.html.en)</sup>

## 获取与许可

该语言随 Mathematica、Wolfram|One、Wolfram|Alpha Notebook Edition 和 Wolfram Finance Platform 一同提供，Wolfram Desktop 是这些产品共用的桌面应用程序。<sup>[5](https://www.wolfram.com/desktop/system-requirements/)</sup><sup> • </sup><sup>[18](https://support.wolfram.com/6479)</sup> 自 2019 年起，Wolfram 提供面向开发者的免费 Wolfram 引擎，它将语言内核打包，供脚本、终端会话和客户端库使用。其许可证允许开发、非商业个人项目和经批准的开源工作，但禁止在生产软件中运行该引擎，或为商业或组织用途生成输出。<sup>[6](https://www.wolfram.com/legal/terms/wolfram-engine.html)</sup>

## 历史与文档

Wolfram Research 创始人、物理学家[斯蒂芬·沃尔夫勒姆](https://www.edgepedia.org/zh/stephen-wolfram)（Stephen Wolfram）创建了该系统，其源流可追溯到他早期的符号数学工作：他在 20 世纪 80 年代关于符号数学计算的论文中指出，FORTRAN 和 C 等标准编程语言的内在数学对象只有数，不足以进行理论物理的符号计算，因此需要一种尽可能接近数学的计算机语言。<sup>[19](https://content.wolfram.com/sw-publications/2020/07/symbolic-mathematical-computation.pdf)</sup>

《Mathematica 全书》最初于 1988 年写成，作为新软件的 750 页配套读物，历经 13 个印刷版次，到英文第五版时增至 1,488 页，内容后来并入在线 Wolfram 文档中心，到 2007 年已超过 10,000 页。<sup>[20](https://www.stephenwolfram.com/publications/mathematica-book/)</sup><sup> • </sup><sup>[7](https://www.scc.kit.edu/en/products/mathematica.php)</sup>

## References

1. [Wolfram Language: Programming Language + Built-In Knowledge, Wolfram Research](https://wolfram.com/language/?source=home)
2. [Expressions, Wolfram Language & System Documentation Center](https://reference.wolfram.com/language/guide/Expressions.html.en)
3. [Celebrating 35 Years of Mathematica, Stephen Wolfram (YouTube)](https://www.youtube.com/watch?v=HxWg8exJxNY)
4. [Wolfram User Interfaces, Wolfram Research](https://wolfram.com/language/core-areas/user-interfaces/?source=home)
5. [Wolfram Desktop Requirements and Platform Availability, Wolfram Research](https://www.wolfram.com/desktop/system-requirements/)
6. [Free Wolfram Engine for Developers: Terms and Conditions of Use, Wolfram Research](https://www.wolfram.com/legal/terms/wolfram-engine.html)
7. [Mathematica, Software Catalogue, Steinbuch Centre for Computing, Karlsruhe Institute of Technology](https://www.scc.kit.edu/en/products/mathematica.php)
8. [Expressions and Their Structure, An Elementary Introduction to the Wolfram Language](https://www.wolfram.com/language/elementary-introduction/2nd-ed/33-expressions-and-their-structure.html)
9. [Symbolic Expressions, Wolfram Language Fast Introduction for Programmers](https://wolfram.com/language/fast-introduction-for-programmers/en/symbolic-expressions/)
10. [Evaluation of Expressions, Wolfram Language & System Documentation Center](https://reference.wolfram.com/language/tutorial/EvaluationOfExpressions.html)
11. [Applying Functions to Lists, Wolfram Language & System Documentation Center](https://reference.wolfram.com/language/guide/ApplyingFunctionsToLists.html.en?source=footer)
12. [Functional Operations, Wolfram Language & System Documentation Center](https://reference.wolfram.com/language/tutorial/FunctionalOperations.html?view=all)
13. [Mathematica Notebook Technology, Wolfram Research](https://www.wolfram.com/technologies/nb/index.en.html?footer=lang)
14. [Wolfram Notebooks: Environment for Technical Workflows, Wolfram Research](https://www.wolfram.com/notebooks/?source=home)
15. [Wolfram Universal Deployment System, Wolfram Research](https://wolfram.com/universal-deployment-system/?source=home)
16. [External System Integration: New in Wolfram Language 12, Wolfram Research](https://www.wolfram.com/language/12/external-system-integration/?product=mathematica)
17. [Python, Wolfram Language & System Documentation Center](https://reference.wolfram.com/language/ref/externalevaluationsystem/Python.html.en)
18. [What are the system requirements for Wolfram products?, Wolfram Support](https://support.wolfram.com/6479)
19. [Symbolic Mathematical Computation, Stephen Wolfram](https://content.wolfram.com/sw-publications/2020/07/symbolic-mathematical-computation.pdf)
20. [The Mathematica Book, Stephen Wolfram](https://www.stephenwolfram.com/publications/mathematica-book/)

---
*Initially written Sep 17, 2026 · Reviewed: Sep 17, 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/wolfram-language

English original: https://www.edgepedia.org/wolfram-language
