Re:Crafting Interpreters
by returningfory2 on Friday April 29, 2022 @11:38AM
(#31206527)
I think the test infrastructure for the book described in that post is just so smart.
For those who haven't read the post: the test infrastructure compiles (and runs?) the interpreter code as it exists at the end of each chapter in the book. So not only is the code as a whole guaranteed to compile, but if you follow along correctly, at the end of each chapter you are guaranteed to get something runnable.
It's interesting that the author seems to have independently invented literate programming. At any rate, that page describes a home-grown literate programming system without mentioning the term "literate programming".
I am not sure it really is literate programming, in the traditional sense. In literate programming source code and text are intertwined while Crafting Interpreters keeps code aligned to text but they are distinct https://github.com/munificent/craftinginterpreters
EDIT: BTW the book is great, can't recommend it enough! :)
https://journal.stuffwithstuff.com/2020/04/05/crafting-craft...