编程语言与软件工程2010st.cs.uni-saarland.de
下一代主流编程语言:游戏开发者的视角 (2005)
The Next Mainstream Programming Language: A Game Developer’s Perspective (2005)
进阶 · 约 45 分钟读完前置知识:函数式编程基础、并发编程、类型系统基础
导读
这是 Epic Games 创始人、《虚幻》引擎缔造者 Tim Sweeney 在 2005 年 POPL 大会上的著名演讲幻灯片,探讨游戏开发对下一代主流编程语言的需求。他分析了游戏代码中并发、软件事务内存、模块化等挑战,主张以纯函数式为默认、通过显式效果类型暴露命令式构造,并期望静态可验证的内存与数组访问。
HN 关注点:这份近二十年前的预言在 Rust、Bevy 等现代语言与引擎中的应验程度,以及其中哪些设想(如静态验证数组访问)至今仍不现实。
后来怎么样
这篇演讲成为编程语言界讨论游戏与并发语言设计的经典文献,其关于纯函数式默认加显式效果类型的设想被视为 Rust 等语言部分实现的先声,并常被引用来讨论下一代系统编程语言的方向。
HN 评论精选
这几条评论里:支持 1 质疑 1 补充 3
支持Sweeney 的核心主张与 Haskell 社区的一贯论点一致
「纯函数式应为默认,命令式构造是必须通过显式效果类型暴露的重要特性」——这正是 Haskell 社区每次有人抱怨某些算法难以用函数式表达时提出的论点。
tel查看英文原文
Purely Functional is the right default Imperative constructs are vital features that must be exposed through explicit effects-typing constructs This is precisely the argument Haskellers make every time someone complains about algorithms that are difficult to formulate functionally.
质疑质疑静态验证数组访问的设想不切实际
「所有解引用和数组访问必须静态可验证,而不是引发顺序异常」——这简直是白日梦。很多情况下你根本无法静态验证数组下标,除非让程序员写 assert 语句,编译器在无法证明正确性时自动插入(就像 Java JIT 能把循环中的边界检查提升出去那样)。
silvestrov查看英文原文
> All dereference and array accesses must be statically verifyable, rather than causing sequenced exceptions This is such a pipe dream. In so many cases you will not be able to verify array index statically except by having the programmer write assert statements which the compiler could do automatically when it can't prove correctness (like the java JIT which can lift out bounds checking from loops).
补充Rust/Bevy 正在部分实现 Sweeney 当年的愿景
我期待 Rust 能被主流游戏开发引擎采用。在那之前可以先看看 Bevy 引擎(https://bevyengine.org/)。
agluszak查看英文原文
I'm looking forward to Rust's adoption in popular game development engines. There's https://bevyengine.org/ in the meanwhile
补充游戏开发者社区也在自建语言,如 Jonathan Blow 的 Jai
Jonathan Blow 多年来一直在开发一门新编程语言,上次看时感觉挺酷的,好像叫 Joi。整体上就是一门更舒适、专为游戏开发设计的 C++。更正:这门语言叫 Jai(https://inductive.no/jai/),Joi 是《银翼杀手2049》里 Ana de Armas 演的 AI。
pelagicAustral查看英文原文
Jonathan Blow has been working for ages on a new programming language that seemed pretty cool last time I checked. Joi, i think it was called. Overall just looked like a more comfy C++ designed specifically for game development. Correction: the language is called Jai https://inductive.no/jai/ Joi is Ana de Armas AI version.
补充补充作者背景:Epic Games 创始人、虚幻引擎缔造者
给不了解的人介绍一下 Tim Sweeney 是谁:他是 Epic Games 的创始人,也是著名虚幻游戏引擎背后的开发者。John Carmack 和 Tim Sweeney 是我在游戏世界里的英雄。
azharcs查看英文原文
For those of you, who don't know, Who Tim Sweeney is? Tim Sweeney is the founder of Epic Games and the person behind very famous Unreal game engines. John Carmack,Tim Sweeney have been some of my heroes from gaming world. http://en.wikipedia.org/wiki/Tim_Sweeney_%28game_developer%29
相关资源
从这篇论文所有 HN 讨论帖的全部评论里整理出来的链接。
历次讨论
- 2010Hacker News 讨论帖46 分 · 14 评
- 2010Hacker News 讨论帖27 分 · 22 评
- 2022Hacker News 讨论帖88 分 · 88 评
同领域还值得读
Google 的软件工程(2017)
Software Engineering at Google (2017)
介绍了 Google 的软件工程实践,包括其单一代码库(monorepo)、几乎全部开发在主干进行而非分支、代码审查、构建系统 Blaze、协议缓冲区等工具与流程,并讨论了频繁重…
编程语言与软件工程2017 · 1,127 分 · 465 评 · 引用 15入门 · 约 45 分钟编辑精选Peter Naur:编程作为理论构建 (1985)
Peter Naur – Programming as Theory Building (1985)
Peter Naur 1985 年的经典论文《Programming as Theory Building》提出:编程的本质不是写代码或文档,而是在程序员头脑中构建对程序及其运行…
编程语言与软件工程2016 · 629 分 · 74 评入门 · 约 45 分钟编辑精选SciPy 1.0:Python 科学计算的基础算法
SciPy 1.0: fundamental algorithms for scientific computing in Python
这篇发表于 Nature Methods 的论文介绍了 SciPy 1.0——Python 科学计算生态的基石库,涵盖其核心算法模块(优化、积分、插值、线性代数等)、软件架构与社…
编程语言与软件工程2020 · 387 分 · 98 评入门 · 约 45 分钟编辑精选Lisp 的历史(1979)
History of Lisp (1979)
这是 Lisp 发明者 John McCarthy 于 1979 年为 HOPL(编程语言史)会议撰写的回顾文章,讲述 Lisp 的起源、设计动机与早期演进,文中也涉及 if 表…
编程语言与软件工程2018 · 352 分 · 44 评入门 · 约 45 分钟编辑精选使用 NumPy 进行数组编程
Array Programming with NumPy
这篇 Nature 文章介绍 NumPy 的数组编程模型及其在科学计算中的核心作用:以 ndarray 为中心,通过向量化操作让 Python 高效处理多维数组。
编程语言与软件工程2020 · 318 分 · 134 评入门 · 约 40 分钟编辑精选