按年被提到
20082010 · 9 次2026
开源书›语言实现与理论·No.28·简称 PLAI

Programming Languages: Application and Interpretation

编程语言:应用与解释
Shriram Krishnamurthi

用 Racket 一步步写解释器,讲清语言特性与类型系统

免费阅读 ↗
被推荐 · 55 人首次 2008-03-14 · 最近 2024-08-13许可证 CC BY-NC-SA 4.0
55不同的人
57活跃月份
31有推荐的月份
66讨论串

Shriram Krishnamurthi 写的程序语言教材,用 Racket 实现一个个小解释器,来讲解函数、闭包、惰性求值、continuation 和类型推导等语言特性。写法是先动手实现、再讨论背后的理论,配有练习,作者还公开了视频课程。和 SICP 相比更聚焦语言实现与语义,不讲词法和语法分析,适合作为 SICP 之后的进阶读物。

HN 为什么推荐它

HN 上的人把它当作自学语言实现和类型系统的首选免费教材,常说它是 SICP 之后很好的衔接,类型推导的章节尤其被点名;有人提到它不涉及 parsing。

难度 3 / 5约 50 小时开放许可
适合谁

想自己实现编程语言、学习语言设计的程序员

读之前最好知道
1函数式编程基础
2递归(recursion)
3Scheme 或 Racket 基础

怎么读

由 Claude 根据这本书和 HN 上的说法整理,可能有错
  1. 1先熟悉 Racket,再从最小的解释器那几章开始读
  2. 2每章的练习都动手写一遍,别只看代码
  3. 3对照作者的视频课程一起看,理解更快
  4. 4类型相关章节可在读完解释器部分后再读

HN 书评

推荐在前,同类按时间 · 每本最多保留 20 条,统计用全部提及 · 作者本人贴的不算
强烈推荐paulitex · 2010-09

“Probably the most influential book of my entire CS degree, not too difficult once you get used to Scheme, and incredibly rewarding (and fun!).”

强烈推荐,称是整个 CS 学位中影响最大的书,实现 closure、continuation 等
Ask HN: Help me find an exotic programming language to learn next原评论 ↗
强烈推荐dmunoz · 2013-08

“My favourite free resource in this area is Programming Languages: Application and Interpretation [2], which has video lectures [3]”

强烈推荐为这个领域最喜欢的免费资源,还有视频讲座
Create Your Own Programming Language原评论 ↗
强烈推荐ShaneWilton · 2014-07

“Easily the best textbook I've read on the topic is "Programming Language Application and Interpretation" or PLAI.”

强烈推荐,称是该主题读过最好的教材
Ask HN: I'm a web developer, how do I get started in PLT and compilers原评论 ↗
推荐jcl · 2008-03

“Here's an online book that covers interpretation of programming languages in Scheme (touching on functional language compilation in several places):”

推荐这本在线书,用 Scheme 讲语言解释
Ask YC: Good compiler books?原评论 ↗
推荐silentbicycle · 2008-08

“Also see chapter 22 in Shriram Krishanamurthi's _Programming Languages: Application and Interpretation_.”

指出第 22 章讲 Y combinator 如何替代 Scheme 的 define
The Y Combinator, or How to Succeed at Recursion Without Really Recursing原评论 ↗
推荐mahmud · 2009-11

“Or you can skip lexing and go straight to language design:”

推荐它跳过词法分析,直接进入语言设计
Writing a Lexer原评论 ↗
看全部 20 条 →
推荐Fixnum · 2010-05

“"Programming Languages: Application and Interpretation". Programming Languages”

把它列入免费电子书清单
Ask HN: Free Programming eBooks原评论 ↗
推荐kwantam · 2011-06

“I found it to be a reasonable follow-on to SICP and a relatively enjoyable read to boot.”

认为它是 SICP 合理的后续读物,读起来愉快
How do I create my own programming language and a compiler for it原评论 ↗
推荐lincolnq · 2012-04

“A good introduction can be found in Krishnamurthi's free book PLAI in the chapters on types.”

推荐其类型章节作为类型入门
Functional programming's smugness problem 原评论 ↗
推荐spacemanaki · 2013-04

“The first edition of PLAI has a nice introductory chapter on types that explains this notation and has a whole section on type inference.”

称初版有一章类型入门,解释记号并讲 type inference
“What part of Milner-Hindley do you not understand?”原评论 ↗
推荐eru · 2013-04

“If you can already programme then "Programming Languages: Application and Interpretation" is a great follow-up.”

推荐给已会编程的人作为很好的后续读物
Why SICP Matters原评论 ↗
推荐takikawa · 2013-08

“It's an excellent free undergraduate-level PL textbook that covers a lot of ground and is informed by both research and practice.”

推荐为内容广、兼顾研究与实践的优秀免费 PL 本科教材
Create Your Own Programming Language原评论 ↗
推荐jbclements · 2014-04

“you should take a look at Shriram Krishnamurthi's Programming Languages and Interpretation, second edition, at Programming Languages. It's a free online book, and I'm currently using it as the text in my programming languages class.”

推荐这本免费在线书,自己正拿它当 PL 课教材
Learn C and build your own Lisp原评论 ↗
推荐makmanalp · 2014-12

“His other book was PLAI which was pretty cool”

称它挺酷,能把复杂的语言特性讲得简单
Programming and Programming Languages原评论 ↗
推荐jeffreyrogers · 2015-03

“Looking at the table of contents, I like the ordering of the topics.”

看了目录,喜欢它的主题顺序安排
Programming Languages – Application and Interpretation (2007)原评论 ↗
推荐chadaustin · 2015-10

“I'm thrilled to see a growing body of accessible* PL and type theory literature”

为通俗易懂的 PL 和类型理论读物越来越多而欣喜
Several types of types in programming languages原评论 ↗
推荐mbrubeck · 2016-02

“University textbooks with Scheme/Racket as a primary language for examples/exercises:”

把它列为以 Scheme 或 Racket 写例子和习题的大学教材
Why Learn to Program in C?原评论 ↗
推荐krat0sprakhar · 2016-04

“The two resources that I've found invaluable are - the prog lang course[1] by Dan Grossman and PLAI[2] by Shriram.”

称它与 Grossman 的课程都是极有价值的资源
A Path to Programming Language Theory原评论 ↗
推荐joshuata · 2016-07

“One of the best resources I've found is Programming Languages: Application and Interpretation by Shriram Krishnamurthi[1].”

推荐为最好的资源之一
Ask HN: What's the best material to learn Racket?原评论 ↗
推荐simplify · 2017-08

“I found these resources invaluable when implementing my first type system:”

称实现第一个类型系统时发现这些资源极有价值
A programming language from scratch: 3 steps to an interpreter原评论 ↗