Writing a C Compiler
Writing a C Compiler by Nora Sandlerby 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%
Recommended in 8 of 13 months
- November 2025: recommended
- December 2025: recommended
- January 2026: not recommended
- February 2026: recommended
- March 2026: not recommended
- April 2026: recommended
- May 2026: recommended
- June 2026: recommended
- July 2026: recommended
- August 2026: not recommended
- September 2026: not recommended
- October 2026: recommended
- 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.
| Product | Recommend | Criticize | Approval | Months | Owned | Badge |
|---|---|---|---|---|---|---|
| Compilers: Principles, Techniques, and Toolsby Aho, Sethi and Ullman | 23 | 17 | 58% | 9 | — | — |
| Modern Compiler Implementationby Andrew Appel | 9 | 0 | 100% | 4 | — | — |
| Writing a C Compilerby Nora SandlerThis page | 8 | 2 | 80% | 8 | — | — |
| Engineering a Compilerby Cooper and Torczon | 6 | 0 | 100% | 3 | — | — |
| Compiler Constructionby Niklaus Wirth | 4 | 0 | 100% | 3 | — | — |
What people said
11 of the 14 comments that mention it, newest first. Each links to the original comment.
“One of my students enjoyed”
“Writing a C Compiler is really good. I enjoyed myself doing it with Rust and Zig.”
“basically useless as a passive reader”
“Her book sits closer to what you'd get from an undergraduate level compilers course”
“It certainly isn't easy (maybe 3x harder than Crafting Interpreters), but I've learned a ton”
“this really nice book by Nora Sandler: Writing a C Compiler”
“I recommend it with one caveat: you'll need to have written some interpreters before”
“approachable and fun if you want a less academic approach”
“Those are some new and very very shallow books.”
“books that guide you through implementing complex systems projects from scratch”
“still a very good book for writing your first compiler”
Counts come from 1,795,640 Hacker News comments, November 2025 to November 2026. How we count. Report a mistake.