3 ms·
If you want to understand the beauty of macros don't read silly trollish blogs. I've said it a million times and I'll say it a million more - look at very good
by swannodette 15y ago
If you want to understand the beauty of macros don't read silly trollish blogs. I've said it a million times and I'll say it a million more - look at very good Lisp code that wisely unites elegant runtime code with just enough macro sugar to have something beautiful and idiomatic. So far I can think of no better text than The Reasoned Schemer, http://mitpress.mit.edu/catalog/item/default.asp?ttype=2&tid=10663 http://mitpress.mit.edu/catalog/item/default.asp?ttype=2&.... You get the soul of Prolog in 200 lines of Scheme R5RS. The entire system fits on 2 pages.
This book is written by three true masters of macros and functional programming Oleg Kiselyov, William Byrd, and Daniel P. Friedman.
- silentbicycle 15y agoThank you for suggesting good code to read, so many comments like this just leave people hanging. :) I know great C code to suggest, but draw a blank when it comes to Lisp macros done right.