按年被提到
20202021 · 7 次2026
编程语言与编译器›类型系统与函数式语言·arXiv:2005.11710 · cs.PL

Featherweight Go

Featherweight Go:Go 泛型的形式化演算
Robert Griesemer, Raymond Hu, Wen Kokke, Julien Lange, Ian Lance Taylor, Bernardo Toninho, Philip Wadler, Nobuko Yoshida · 2020

Go 泛型的形式化核心演算,含单态化与类型安全

开始阅读 ↗PDFalphaXiv 讨论
被推荐 · 15 人首次 2020-05-26 · 最近 2026-08-01发表于 Proceedings of the ACM on Programming Languages
15不同的人
15活跃月份
18讨论串
16被引(OpenAlex)

论文受 Igarashi、Pierce 和 Wadler 的 Featherweight Java 启发,给出 Go 泛型的设计与形式化。Java 的子类型是名义的、泛型靠擦除实现,而 Go 的子类型是结构化的、泛型采用单态化(monomorphisation);作者是最早对单态化做形式化的工作之一,该设计还支持解决表达式问题(The Expression Problem)。

HN 为什么提它

评论者在讨论 Go 泛型时引用它,说明 Go 泛型有形式化基础,并常借此提到 Philip Wadler 受 Go 团队邀请参与设计的经过。

方法难度 4 / 5约 60 分钟经得起时间
读之前最好知道
1类型系统与子类型
2泛型与单态化(monomorphisation)
3操作语义与类型安全证明
4Go 语言的接口

HN 书评

推荐在前,同类按时间 · 每篇最多保留 20 条,统计用全部提及
推荐siraben · 2021-05

“I'm studying programming language semantics and papers like these are quite valuable in understanding type systems of real languages, see also Featherweight Java[0] and Featherweight Go[1].”

推荐给学编程语言语义的人,帮助理解真实语言的类型系统
Oxide: The Essence of Rust (2020)原评论 ↗
引用mikelward · 2020-06

“If this follows the monomorphic approach described in Featherweight Go [1][2]”

引用它说明 Go 泛型的单态化做法
The Next Step for Generics原评论 ↗
引用gstipi · 2020-07

“I don't think that's a fair statement, given Phil Wadler's formal work on generics in Go”

引用 Wadler 对 Go 泛型的形式化工作,反驳某种说法
Hindley-Milner Type Inference (2012)原评论 ↗
引用throwaway34241 · 2020-11

“They've made almost no changes to the language so far so obviously the evidence is still out on the former case”

借 Go 泛型的形式化工作,说明证据尚不充分
Go Type Parameters – Draft Design原评论 ↗
引用fanf2 · 2021-01

“generic types will not simply be a synonym for interface{} because the compiler will be able to monomorphize them”

指出 Go 泛型会被编译器单态化,不等同于 interface{}
A Proposal for Adding Generics to Go原评论 ↗
引用mauricioc · 2021-02

“Philip Wadler (of Haskell fame) was involved both in the design of Java generics [0] and of Go generics [1].”

指出 Wadler 参与了 Java 和 Go 泛型的设计
Golang generics proposal has been accepted原评论 ↗
看全部 15 条 →
引用mseepgood · 2021-07

“Recently, the Go team mooted a design to extend Go with generics, and Rob Pike wrote Wadler to ask: Would you be interested in helping us get polymorphism right”

说明 Go 团队曾邀请 Wadler 帮忙设计多态
Map[string]interface{} in Go: a user's manual原评论 ↗
引用mseepgood · 2021-10

“And he was the one who invited Phil Wadler to help with the generics design.”

指出是 Rob Pike 邀请 Wadler 帮忙设计泛型
Go: Don't Change the Libraries in 1.18原评论 ↗
引用mseepgood · 2021-12

“Go's generics were formally validated [1].”

在 Go 与 Rust 之争中称 Go 泛型已被形式化验证
Trying Out Generics in Go原评论 ↗
引用throwaway34241 · 2022-03

“The totality of the prior art here is above my pay grade, but I can quote the Haskell people they roped in [4]:”

引用 Haskell 圈人士的话,说明相关先行研究
How generics are implemented in Go 1.18原评论 ↗
引用Laremere · 2022-05

“Philip Walder, who contributed to the design of Haskell (according to wikipedia, haven't dug deep here) worked with the Go developers on a PL theory underpinning for Go's generics: Featherweight Go”

指出 Wadler 与 Go 开发者合作为泛型建立了 PL 理论基础
Calculating Go type sets is harder than you think原评论 ↗
引用riwsky · 2024-11

“Are we just ignoring when they invited Philip “Featherweight Java” Wadler to help them design Go generics? Featherweight Go”

反问:Go 邀请 Wadler 设计泛型的事被忽略了吗
Borgo Programming Language原评论 ↗
引用cayley_graph · 2025-06

“Rob Pike asked for his help again designing the generics system for Go [2,3].”

引用 Rob Pike 再次请 PL 研究者帮忙设计 Go 泛型
(On | No) Syntactic Support for Error Handling原评论 ↗
引用typical182 · 2026-08

“My understanding is that while Philip Wadler and his colleagues were very helpful, the core Go team was already well on its way to doing generics before Philip Wadler became involved.”

指出 Wadler 介入前,Go 团队已在做泛型
Golang proposal: container/: generic collection types原评论 ↗
玩笑pjmlp · 2020-07

“It appears Go needs PhDs after all.”

Go is boring, and that’s fantastic原评论 ↗
被提交为 story · 3 次