from Hacker News

Introduction to Compilers and Language Design (2021)

by fcambus on 5/15/22, 4:40 PM with 68 comments

  • by nhatcher on 5/18/22, 9:51 AM

    Oh wow! Great resource. I think it strikes the right balance between lexing/parsing vs code generation/optimization.

    I see that not even in modern books things like PEG parser or Pratt parsing make the cut. Which is a pity IMHO. As an aside I am yet to find a great book/resource of garbage collectors that I can understand. It is such a fascinating subject!

    If you want to dive into compiler/interpreters but do not want to go straight into the computer science of it I wholeheartedly recommend:

    https://compilerbook.com and https://interpreterbook.com

    And, of course, the incomparable book by Robert Nystrom "Crafting Interpreters""

    https://craftinginterpreters.com/

  • by isaacfrond on 5/18/22, 7:38 AM

    Great initiative. More professors should do this; write your own material suitable to teach a course, and make it freely available.

    What I also like is that if you find errata, you have a place to send them, with a reasonable expectation that they will be picked up in a new version.

  • by emoII on 5/18/22, 3:41 PM

    Out of curiosty, could anyone explain to me the reason they think programming languages and the parts that combine into making them work are interesting?

    I feel like I have an interest in it, but I'm having a hard time figuring out _why_ I find it so appealing. I know the why doesn't matter as long as I enjoy it, but I'm curious what others think.

  • by ModernMech on 5/18/22, 2:18 PM

    I’ll be bookmarking this for use in the future. I teach a programming languages course so I’ve looked at a number of these texts, and this seems like a good new one but I have to say I don’t see much that differentiates it from other recent texts out there. It seems well written and organized, but what’s new?

    I would say the best part about this book is the author made it freely available. But if I had to choose a newish compilers book I’d choose Crafting Interpreters, which is also available for free.

    One thing that I don’t like so much is the word “design” in the title, as there’s really not much content in the book on how to design a language; most of it is devoted to implementing an already designed language. I’m not sure anyone who learns from this book would be able to design a language unlike C.

  • by ki_ on 5/18/22, 8:48 AM

    when clicking the link, first though was "introduction to web-design" ^_^ looks interesting though. Thanks.