Hacker ApprovedDepartments

Writing a C Compiler

Writing a C Compiler by Nora Sandler

by Nora Sandler

Ranked 3 of 9 compiler textbooks by recommenders

Recommended as a hands-on, approachable first compiler book, less academic than a course. Caveat: readers should have written an interpreter before.

Recommended as a hands-on, approachable first compiler book, less academic than a course. Caveat: readers should have written an interpreter before.

10 people gave an opinion

recommend it
8
criticize it
2
approval share
80%
Each figure is one person. RecommendsCriticizes

Recommended in 8 of 13 months

  1. November 2025: recommended
  2. December 2025: recommended
  3. January 2026: not recommended
  4. February 2026: recommended
  5. March 2026: not recommended
  6. April 2026: recommended
  7. May 2026: recommended
  8. June 2026: recommended
  9. July 2026: recommended
  10. August 2026: not recommended
  11. September 2026: not recommended
  12. October 2026: recommended
  13. November 2026: not recommended (month in progress)

Why it doesn’t carry the badge

  • 8 people recommend itNeeds 10 or more, not met.
  • 4 recommenders for every criticNeeds 2 to 1 or better, met.
  • Recommended in 8 of 13 monthsNeeds 4 or more, met.

The same three rules apply to every product, and the badge can’t be bought. How the badge works

What people say about it

The reasons people give, with the number of comments that give each one. Open a reason to read what they said.

Why people recommend it

Each mark is one comment

  • Praised as a really good book

    “Writing a C Compiler is really good. I enjoyed myself doing it with Rust and Zig.”

    Comment from 11 Jul 2026 in “Show HN: Learn by rebuilding Redis, Git, a database from scratch”

    “this really nice book by Nora Sandler: Writing a C Compiler”

    Comment from 15 Apr 2026 in “Want to Write a Compiler? Just Read These Two Papers (2008)”

    “still a very good book for writing your first compiler”

    Comment from 10 Dec 2025 in “Revisiting "Let's Build a Compiler"”
  • Approachable and fun, less academic

    “Writing a C Compiler is really good. I enjoyed myself doing it with Rust and Zig.”

    Comment from 11 Jul 2026 in “Show HN: Learn by rebuilding Redis, Git, a database from scratch”

    “approachable and fun if you want a less academic approach”

    Comment from 8 Feb 2026 in “Tiny C Compiler”
  • Teaches a lot through guided projects

    “It certainly isn't easy (maybe 3x harder than Crafting Interpreters), but I've learned a ton”

    Comment from 10 May 2026 in “Ask HN: What Are You Working On? (May 2026)”

    “books that guide you through implementing complex systems projects from scratch”

    Comment from 1 Feb 2026 in “The Book of PF, 4th edition”

Other compiler textbooks people recommend

The four most recommended other compiler textbooks, with the same counts for each, so you can compare like for like. The tick on each bar marks the 2 to 1 line the badge needs.

Writing a C Compiler by Nora Sandler compared with 4 alternatives
ProductRecommendCriticizeApprovalMonthsOwnedBadge
Compilers: Principles, Techniques, and Toolsby Aho, Sethi and Ullman231758%9——
Modern Compiler Implementationby Andrew Appel90100%4——
Writing a C Compilerby Nora SandlerThis page8280%8——
Engineering a Compilerby Cooper and Torczon60100%3——
Compiler Constructionby Niklaus Wirth40100%3——
See all 9 compiler textbooks, ranked

What people said

11 of the 14 comments that mention it, newest first. Each links to the original comment.

“One of my students enjoyed”

RecommendsComment from 25 Oct 2026 in “Small Programs and Languages”

“Writing a C Compiler is really good. I enjoyed myself doing it with Rust and Zig.”

RecommendsComment from 11 Jul 2026 in “Show HN: Learn by rebuilding Redis, Git, a database from scratch”

“basically useless as a passive reader”

CriticizesComment from 19 Jun 2026 in “Advanced Compilers: The Self-Guided Online Course”

“Her book sits closer to what you'd get from an undergraduate level compilers course”

RecommendsComment from 18 Jun 2026 in “Advanced Compilers: The Self-Guided Online Course”

“It certainly isn't easy (maybe 3x harder than Crafting Interpreters), but I've learned a ton”

RecommendsComment from 10 May 2026 in “Ask HN: What Are You Working On? (May 2026)”

“this really nice book by Nora Sandler: Writing a C Compiler”

RecommendsComment from 15 Apr 2026 in “Want to Write a Compiler? Just Read These Two Papers (2008)”

“I recommend it with one caveat: you'll need to have written some interpreters before”

RecommendsComment from 8 Feb 2026 in “Tiny C Compiler”

“approachable and fun if you want a less academic approach”

RecommendsComment from 8 Feb 2026 in “Tiny C Compiler”

“Those are some new and very very shallow books.”

CriticizesComment from 1 Feb 2026 in “The Book of PF, 4th edition”

“books that guide you through implementing complex systems projects from scratch”

RecommendsComment from 1 Feb 2026 in “The Book of PF, 4th edition”

“still a very good book for writing your first compiler”

RecommendsComment from 10 Dec 2025 in “Revisiting "Let's Build a Compiler"”

Counts come from 1,795,640 Hacker News comments, November 2025 to November 2026. How we count. Report a mistake.