|
|
|
|
|
by weird_user
1117 days ago
|
|
It's still a useful generic exercise for beginners.
Although I recommend starting with a simpler syntax like sexpr, you can get more practice with less code. For a deeper exercise, I recommend compiling to machine code instead of stopping at bytecode [1]; you can learn assembly along the way, which is more satisfying than compiling to C. [1]: https://github.com/byo-books/pretty_laughable_lang/ |
|
That's why I no longer object to compiler tutorials stopping at assembly or even C, as long as the phases not present in interpreter tutorials like Bob Nystrom's brilliant one are non-trivial: type checking, optimizations, lowering.