“The best guided project/intro I've seen for complete beginners is Daniel Holden's "Build Your Own Lisp".”
Daniel Holden 带读者用 C 语言从零写出一个 Lisp 方言的解释器,同时顺带学习 C 的指针、内存管理和错误处理。全书按章节循序渐进,每章在上一章的代码上增加功能,从解析器一路做到错误处理、宏和标准库,并有配套代码可对照。和只讲理论的语言实现教材相比,它更偏动手,适合同时补 C 和解释器两门课。
HN 上的人常把它推荐给想学 C、或想入门语言实现的初学者,认为它是边做项目边学 C 的好路径,也比多数 Lisp 教程走得更远;评论里还夸排版漂亮。
想通过做项目学 C 和解释器的初学者
怎么读
由 Claude 根据这本书和 HN 上的说法整理,可能有错- 1从第一章起按顺序做,每章都自己敲代码并跑通
- 2遇到指针和内存管理的部分慢一点,别直接抄代码
- 3做完后可以自己加功能,比如新的内置函数
- 4想看更理论的解释器实现,再配合 SICP 读
HN 书评
推荐在前,同类按时间 · 每本最多保留 20 条,统计用全部提及 · 作者本人贴的不算“I really can't recommend the book enough.”
“Tutorial on building a Lisp in C, from two days ago: Build Your Own Lisp”
“It's doing a great job of teaching me C, while also reminding me how great high level languages actually are!”
“Your book looks beautiful!”
“Another interesting book on implementing Lisp (from a C perspective) is Build Your Own Lisp.”
看全部 20 条 →
“Pretty nice and simple. I'm on Chapter 8 of 16.”
“This reminded me of something that helped me learn C a while ago:”
“it is a great, short book to work through, and should help with grokking Carp.”
“From my experience, the best way for learning C has been [0] Build Your Own Lisp and Zed Shaw's [1] Learn C The Hard Way.”
“Some good resources:”
“If you're into PL implementation, you can't go wrong with: Build Your Own Lisp or (链接) or (链接)”
“There are several beginner friendly online resources now including”
“If you're interested in getting started, these are good intros to the basics:”
“for lisp I really liked Build Your Own Lisp which uses modern C libraries so it polishes your C knowledge too.”
“[0], [1], [2] are easy to get started with and great to work through.”
“I am a huge fan of Build Your Own Lisp in C.”
“Build Your Own Lisp - Build Your Own Lisp - Learn C by creating a lisp in C”
“not app, but fun”
“This is one of my favourites [0] that goes a lot further than most, but fits the timeframe. Error handling, macros, standard library all included.”