“I really like this book too and recommend it.”
Doug Hoyte 写的 Common Lisp 宏编程专著,围绕闭包与宏,讲读取宏、照应宏等高级技巧。作者观点鲜明,重在展示宏的威力,书中有大量示例代码。需要有一定 Lisp 基础,和 On Lisp 常被一起提起。官网只放出了部分章节供免费阅读。
HN 上的人推荐它来了解 Lisp 宏有多强,称例子充实,常与 On Lisp 并提;有人读起来觉得有难度,也有评论批评它忽视了 defmacro 的一些问题。
已会 Lisp、想深入宏的程序员
怎么读
由 Claude 根据这本书和 HN 上的说法整理,可能有错- 1先具备 Common Lisp 基础,再读本书
- 2优先读宏和读取宏相关的章节,自己敲例子
- 3对书中的强观点保持批判,对照其他资料核实
- 4与 On Lisp 配合着读,互相印证
HN 书评
推荐在前,同类按时间 · 每本最多保留 20 条,统计用全部提及 · 作者本人贴的不算“Let Over Lambda chapter 4 which has various examples: Let Over Lambda”
“Check Doug Hoyte's version in Let Over Lambda:”
“Really though, I felt similarly to OP until I read On Lisp[0] and Let Over Lambda[1]. They are chock full of explicit examples.”
“Re: the distinction between subroutines and functions, I found (the first section of) this chapter to be interesting.”
“you owe it to yourself to read Paul Graham (of HN)'s own work on compile time programming”
看全部 20 条 →
“Let Over Lambda is also a good (opinionated) book on macros (most of the book is available for free)”
“For ideas on read macros look at Doug Hoyte's [1]”
“I'm hesitant to put too much credence in this book when it seems to ignore significant problems with defmacro.”
“It didn't appear that Let over Lambda was free either, just some select chapters at the bottom of the page.”
“you may be able to get away with macrolet. (Example: Let Over Lambda )”
“[1] as demonstrated e.g. here: Let Over Lambda”
“...have you really looked? Here is a warning, in the section titled, "Reader Security:"”
“At least I came across the following that seems to indicate that:”
“This macro could easily expand to a "switch inside a while" (or, possibly, to a "let over lambda over cond", or maybe even into a series of low-level tagbody and go constructs).”
“"lisp is one of the least functional languages ever created" -Doug Hoyte Let Over Lambda”
“this kind of macro is called an anaphoric macro and is featured in Let Over Lambda and On Lisp.”
“Not every language gives you the ability to modify the syntax of the language at run-time[0].”
“Does Nim really have read time macros?”
“There are read-macros which make this possible: The expression #1=(hello. #1#) builds a circular list that only contains the symbol "hello" [1].”