“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].”
Featherweight Go
Go 泛型的形式化核心演算,含单态化与类型安全
论文受 Igarashi、Pierce 和 Wadler 的 Featherweight Java 启发,给出 Go 泛型的设计与形式化。Java 的子类型是名义的、泛型靠擦除实现,而 Go 的子类型是结构化的、泛型采用单态化(monomorphisation);作者是最早对单态化做形式化的工作之一,该设计还支持解决表达式问题(The Expression Problem)。
评论者在讨论 Go 泛型时引用它,说明 Go 泛型有形式化基础,并常借此提到 Philip Wadler 受 Go 团队邀请参与设计的经过。
HN 书评
推荐在前,同类按时间 · 每篇最多保留 20 条,统计用全部提及“If this follows the monomorphic approach described in Featherweight Go [1][2]”
“I don't think that's a fair statement, given Phil Wadler's formal work on generics in Go”
“They've made almost no changes to the language so far so obviously the evidence is still out on the former case”
“generic types will not simply be a synonym for interface{} because the compiler will be able to monomorphize them”
“Philip Wadler (of Haskell fame) was involved both in the design of Java generics [0] and of Go generics [1].”
看全部 15 条 →
“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”
“And he was the one who invited Phil Wadler to help with the generics design.”
“Go's generics were formally validated [1].”
“The totality of the prior art here is above my pay grade, but I can quote the Haskell people they roped in [4]:”
“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”
“Are we just ignoring when they invited Philip “Featherweight Java” Wadler to help them design Go generics? Featherweight Go”
“Rob Pike asked for his help again designing the generics system for Go [2,3].”
“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.”
“It appears Go needs PhDs after all.”
- Featherweight Go (A generics design for Go) ↗gadmm · 2020-05-26 · 4 分
- Featherweight Go ↗4ad · 2020-05-31 · 252 分
- Featherweight Go [pdf] ↗signa11 · 2021-12-15 · 1 分