我来写那篇与莱斯利·兰波特(Leslie Lamport)合作的论文。
I came to write THAT paper with Leslie Lamport

原始链接: https://lawrencecpaulson.github.io//2026/08/21/Lamport.html

这篇回顾记录了1992年计算机科学家劳伦斯·保尔森(Lawrence Paulson)与莱斯利·兰波特(Leslie Lamport)就后者那篇具有挑衅性的论文《类型被视为有害》(Types Considered Harmful)所进行的合作。兰波特认为,规范语言应当基于无类型集合论,而非类型系统。 起初,保尔森和同行评审人大卫·麦卡利斯特(David McAllester)因兰波特对类型化形式体系理解的缺陷而建议拒稿。然而,编辑安德鲁·阿佩尔(Andrew Appel)坚持发表,促使保尔森与兰波特共同署名,在保留论文精神的同时修正了其中的技术错误。经过漫长且涉及新任、苛刻审稿人的评审过程,该论文最终附带免责声明得以发表。 27年后的今天,作者认为兰波特的论点并未经受住时间的考验。现代类型系统已成为工业级验证不可或缺的工具,而无类型形式体系在符号重载和错误风险增加等实际问题上显得力不从心。保尔森指出,就连兰波特自己的TLA+语言最终也引入了类类型限制。最终,作者总结道,尽管探索集合论符号仍有价值,但类型化系统已在确保可靠规范和验证方面证明了其自身价值。

Hacker News 最新 | 过往 | 评论 | 提问 | 展示 | 招聘 | 提交 登录 我曾与 Leslie Lamport 合著那篇论文 (lawrencecpaulson.github.io) baruchel 发布于 1 小时前 | 13 点 | 隐藏 | 过往 | 收藏 | 2 条评论 | 帮助 blltprfmnk 8 分钟前 | 下一条 [-] 标题漏掉了原文开头的“如何”二字,这完全改变了含义。 回复 srean 34 分钟前 | 上一条 [-] > 另一位审稿人 David McAllester 也得出了同样的结论。 是那位提出了 PAC-贝叶斯界(PAC-Bayesian bounds)的 David McAllester 吗? 答:是的。 https://link.springer.com/article/10.1023/A:1007618624809 回复 指导原则 | 常见问题 | 列表 | API | 安全 | 法律 | 申请 YC | 联系 搜索:
相关文章

原文

21 Aug 2026

[ general  type theory  set theory  memories  ]

As people grow older, they grow wiser, or at least they think they do. Then it becomes their duty to impart their accumulated wisdom to the younger generation. Leslie Lamport made his name in distributed systems and fault tolerance. For many he is better known as the author of LaTeX, the famous macro package that makes Donald Knuth’s legendary TeX typesetting system usable for the rest of us. As Leslie grew older, he felt impelled to write a series of fairly wacky papers with titles such as “How to Write a Long Formula”. Another of these papers was called “Types Considered Harmful”, a diatribe against types in specification languages. Its title was an echo of a famous letter, “go to statement considered harmful”, by Edsger Dijkstra. The title of that letter (chosen by the journal editor) was subsequently borrowed by many authors who were against lots of things. Leslie was against types. But how did I get involved?

Types considered harmful

Leslie‘s thesis was that specification languages should be based on an untyped formalism (a sort of set theory) as opposed to a typed formalism. He advanced several arguments in favour: that untyped formalisms were more flexible; that typed formalisms raised numerous anomalies and issues; that what we would view as a type error in a specification would be detected anyway during verification.

There was some sense in this thesis. Type systems were in a state of flux in 1992 when that note was written. Coq (now Rocq) had only just appeared, and big changes were happening to Martin-Löf type theory. As for simple type theories, early implementations of HOL had been around only for a couple of years. It wasn’t clear what any typed calculus could do. Proof assistants did not yet support type classes. John Harrison was years away from introducing his trick to get low-budget dependent types, which works well enough to express $T^n$.

On the other hand, Lamport’s note was a mess. He seemed to be unfamiliar with any actual typed formalism and devoted most of his note to knocking down straw men. So when he submitted his note to TOPLAS for publication and it reached me to referee, my verdict was to reject. The other referee, David McAllester, reached the same verdict. That should’ve been that, but the editor, Andrew Appel, had other ideas.

“Put lipstick on it”

Debate is good, he said. These ideas deserve airing, or something of that sort. But we can’t allow errors in TOPLAS. Why don’t you join with Lamport as co-authors and transform the paper into something technically accurate but in the same spirit? I was game: I knew a fair bit about type systems and I also had my own untyped set-theoretic formalism (Isabelle/ZF), which I was happy to promote. David went along for a bit but soon dropped out. He was smart.

Leslie and I worked on the paper for a good while. It was a weird form of unwilling co-authorship, but somehow we managed. The new paper captured the core of Leslie‘s thesis while including a saner description of how types worked. Along the way, I witnessed Leslie’s unrivalled TeX mastery: low-level tricks that I have never encountered since.

A second round of review, oh God

Meanwhile, Andrew Appel had stepped down as TOPLAS editor. The new editor, Carl Gunter, had not been informed about the special status of this paper. So when it reached him, he sent it to fresh referees. This was not part of the plan. And the new referees also decided to reject the paper. One of the reports was incoherent. It obviously had been written while its author was suffering a fit of apoplexy. So then I contacted Carl and said, wait a minute, my rejection is worth nothing and this guy‘s rejection is somehow valid? Plus, he’s literally insane. So the paper appeared after all, with a disclaimer expressing wishes for a lively debate, etc. etc. etc. I’m not sure the debate ever happened.

In retrospect

And now we can ask how well Leslie’s thesis holds up 27 years later. It’s fair to say, not so well. Type systems have evolved considerably and they have proved their worth in numerous specification and verification tasks, some on an industrial scale.

Meanwhile, little progress has been made on the issues that plague set-theoretic formalisms. Without types you don’t have overloading of notation, which is trivial in principle (you can just use lots of different symbols), but a big deal in practice. And worse, the ability to write absolutely anything is mostly an invitation to make mistakes. Verification is an extremely expensive way to find such mistakes, and those you do not find could render your proofs worthless. As far as I know, even Lamport’s own specification language (TLA+) was eventually implemented with some type restrictions.

So, in fact, your specification language probably should be typed. But it is also still worth looking for ways to make set-theoretic notations work better.

联系我们 contact @ memedata.com