news.volyx.in

Want to write a compiler? Just read these two papers (2008) (prog21.dadgum.com)

509 points by downbad_ · 91 days ago · 159 comments on HN

Article summary

The article discusses the challenges of learning to write a compiler, citing the complexity and broad scope of existing books on the subject. It recommends two resources, Jack Crenshaw's series 'Let's Build a Compiler!' and the paper 'A Nanopass Framework for Compiler Education', as more accessible and practical introductions to compiler writing. These resources focus on simplicity and breaking down the compilation process into manageable transformations. They provide a more gentle learning curve for beginners.

Main themes

  • Compiler writing
  • Programming education
  • Technical writing
  • Language design
  • Computer science education

What commenters say

  • Some commenters recommend alternative resources, such as 'Understanding and Writing Compilers' by Richard Bornat, for learning about compiler writing.
  • Others share their personal experiences with compiler courses, describing them as challenging but rewarding, or painful and difficult.
  • There is disagreement about the suitability of certain resources, such as the 'nand2tetris' course, for absolute beginners.
  • Some commenters appreciate the 'Crafting Interpreters' book, but suggest that it could be complemented by additional resources covering topics like types, optimization, and linking.
  • The complexity of type systems and their implementation is acknowledged, with some arguing that it is not a beginner-friendly topic, while others recommend specific books, such as 'Types and Programming Languages' by Benjamin C Pierce.
  • The importance of a good teacher or instructor is highlighted, with some commenters attributing their positive learning experiences to the quality of the course or instructor.