3 ms·
How well do these books strike a balance between feeding you the code and forcing you to think for yourself before implementing the code?
by cinntaile 4y ago
How well do these books strike a balance between feeding you the code and forcing you to think for yourself before implementing the code?
- wiseowise 4y agoWhy don’t you check yourself? https://craftinginterpreters.com/contents.html https://craftinginterpreters.com/contents.html
- cinntaile 4y agoI haven't worked through these books so someone that has would know.
- signaru 4y agoAs the books document complete implementations, they do feed you the code, and it is easy to fall to the trap of just copying the code from the book. I think the best approach is to port it to another implementation language as you read the book. However, compared to other books I've seen these are more "granular" in the code explanations so you're simulating the authors' coding thought process instead of just looking at big blocks of finished code. In particular in Crafting Interpreters, there are many parts where you go back and revise the code from previous chapters as some language features/concepts are introduced in subsequent chapters (my memory of Writing an Interpreter/Compiler in Go is not that fresh). I think it is a good sign that these books start with "int main()" (or it's equivalent). Other books I've seen start by describing functions in isolation, so they are not immediately testable, and it encourages the reader to just get the finished codebase to have something to play with.