Crafting Interpreters

The DIY language book fans adore — and the nerd fight over “typedef” begins

TLDR: A beloved book teaches you how to build your own programming language, with a free web version that fans rave about. The comments split between praise and nerdy debates over tricky C/C++ quirks, while a companion coding challenge keeps the hype real and hands-on.

“Crafting Interpreters” isn’t just a book, it’s a vibe: build-your-own programming language, available in print, ebook, PDF, and a free web edition. Fans showed up in force, again, with big threads on HN in 2020 and HN in 2024, calling it the language-nerd Bible. The mood? Starry-eyed gratitude, with a side of “I’m totally doing this weekend project.”

But the comments weren’t all heart eyes. The drama landed when one dev asked how to handle the messy bits—like C/C++’s “typedef” weirdness (when the same word can mean different things) and “hoisting” (using names before they’ve been formally introduced). Translation: some folks want the book to tame the wildest corners of real-world languages, while others clap back that this book teaches the core journey, not every gnarly edge case. Acronym watch: PEG (Parsing Expression Grammar) gets name-dropped with “hacky” fixes, which sparked mini debates about purity vs practicality.

There’s also delightfully wholesome energy. One commenter praises the free web version as “incredibly generous.” Another says porting the ideas to other languages (especially those missing some of Java’s features) is tricky—but that’s half the fun. And for people who learn by doing, CodeCrafters rolled out a companion coding challenge. Jokes fly about the 640-page print being a “gym membership,” and the author’s midnight-feedings origin story getting meme’d as “baby asleep, compiler awake.”

Key Points

  • The book teaches how to implement a full-featured scripting language from scratch, starting at main().
  • It covers parsing, semantics, bytecode representation, and garbage collection, along with language features like dynamic typing, lexical scope, closures, classes, and inheritance.
  • The print edition is 640 pages with hand-drawn illustrations and custom typesetting.
  • The ebook includes tuned CSS, full-color syntax highlighting, and live hyperlinks; a PDF mirrors the print layout.
  • A responsive web version provides the entire book for free.

Hottest takes

“The web version being free is incredibly generous.” — Nora23
“Really I would love to know how parse context sensitive stuff like typedef” — stevefan1999
“we (CodeCrafters) built a coding challenge as a companion to this book” — rohitpaulk
Made with <3 by @siedrix and @shesho from CDMX. Powered by Forge&Hive.