3 ms·
I want to dive into creating a language / compiler finally but I might do it with the Writing an Interpreter / Compiler series in Golang. Just so I can dive in
by giancarlostoro 7y ago
I want to dive into creating a language / compiler finally but I might do it with the Writing an Interpreter / Compiler series in Golang. Just so I can dive in and try to digest it all. Course I always heard of the dragon book and have wanted it since.
- chrisseaton 7y ago> Course I always heard of the dragon book and have wanted it since. I wouldn’t read it except out of historical interest - it’s not how we build compilers anymore, with its super-heavy emphasis on parsing and syntax-directed translation.
- giancarlostoro 7y agoIs there something close to it in the modern sense then?
- chrisseaton 7y agoNot really! It's a bit of a problem that there isn't a good compiler book at the moment, in my opinion. Everything is either far too basic, or too specialised. If a practising programmer wanted to learn compiler and write a compiler today I don't know what they could easily look at. They'd have to read a lot and then get a lot of extra guidance about what to use and what not to use.
- giancarlostoro 7y agoWhat are some good resources that cover basics and get very specialized? I wouldn't mind reading through some, I just wanna read everything I can but as long as it's relevant to today, I may still get the dragon book though.
- chrisseaton 7y agoSuper basic: * https://interpreterbook.com/ https://interpreterbook.com/ * https://compilerbook.com/ https://compilerbook.com/ Somewhat more practical: * https://www.craftinginterpreters.com/ https://www.craftinginterpreters.com/ ... massive gap here ... Serious: * Engineering a Compiler (even this wastes soooo much time on parsing) * Optimizing Compilers for Modern Architectures * Advanced Compiler Design and Implementation I'm not exaggerating or being contrary for the sake of it when I say disregard the Dragon book - we don't build compilers like that any more. It's not even like it teaches you the foundations that are still useful because I think the foundations and what we emphasise as important now have changed so much.