

Buy anything from 5,000+ international stores. One checkout price. No surprise fees. Join 2M+ shoppers on Desertcart.
Desertcart purchases this item on your behalf and handles shipping, customs, and support to Iceland.
Despite using them every day, most software engineers know little about how programming languages are designed and implemented. For many, their only experience with that corner of computer science was a terrifying "compilers" class that they suffered through in undergrad and tried to blot from their memory as soon as they had scribbled their last NFA to DFA conversion on the final exam. That fearsome reputation belies a field that is rich with useful techniques and not so difficult as some of its practitioners might have you believe. A better understanding of how programming languages are built will make you a stronger software engineer and teach you concepts and data structures you'll use the rest of your coding days. You might even have fun. This book teaches you everything you need to know to implement a full-featured, efficient scripting language. You’ll learn both high-level concepts around parsing and semantics and gritty details like bytecode representation and garbage collection. Your brain will light up with new ideas, and your hands will get dirty and calloused. Starting from main(), you will build a language that features rich syntax, dynamic typing, garbage collection, lexical scope, first-class functions, closures, classes, and inheritance. All packed into a few thousand lines of clean, fast code that you thoroughly understand because you wrote each one yourself. Review: Excellent book! - Must read for anyone interested in programming (whether you like to build interpreters or not). The step-by-step approach, gentle introduction to complex topics and humor is a joy to read. Review: Great hands-on interpreter implementation book for beginners - Excellent book! It takes a hands-on approach to implementing an interpreter. While it covers the basics of theory, it also walks you through two complete implementations of an interpreter for the Lox language (a language designed specifically for this book). The book is not heavy on theory and is an excellent choice for someone who knows nothing about interpreters and wants to learn by doing or for someone who also wants to be able to say, "I wrote an interpreter." It is also beautifully designed, full of nice illustrations, and is written with humor.
| Best Sellers Rank | #47,323 in Books ( See Top 100 in Books ) #1 in Compiler Design #1 in Software Programming Compilers #7 in Software Design Tools |
| Customer Reviews | 4.8 out of 5 stars 725 Reviews |
S**N
Excellent book!
Must read for anyone interested in programming (whether you like to build interpreters or not). The step-by-step approach, gentle introduction to complex topics and humor is a joy to read.
I**N
Great hands-on interpreter implementation book for beginners
Excellent book! It takes a hands-on approach to implementing an interpreter. While it covers the basics of theory, it also walks you through two complete implementations of an interpreter for the Lox language (a language designed specifically for this book). The book is not heavy on theory and is an excellent choice for someone who knows nothing about interpreters and wants to learn by doing or for someone who also wants to be able to say, "I wrote an interpreter." It is also beautifully designed, full of nice illustrations, and is written with humor.
A**S
Super. Fascinating.
One of the best tech books I've ever read. The author implements an interpreter for the same (made up) language, twice. Once in Java, and again, in a much more low-level way, in C. The writing is crisp and clear, and the examples are complete. (the full code is available on GitHub, and he walks you through everything) You'll get as much out of this book as you want. Highly recommend.
L**O
Seems useful, pay attention target is to implement Lox language (!?)
No he acabado el libro Compiladores no es un tema sencillo El libro es útil, completo y tiene resursos en GitHub que espero sean de utilidad La pega es que se quiere implementar el lenguaje Lox (?!) Por otra parte no se usa ni explica ni Lex ni Yacc con el objetivo de implementar todas las partes del compilador Se usa inglés nativo con expresiones coloquiales pero en general bien
A**E
Good book, printing quality ok (read on).
This is not an Ai review. I used the book as an intro to writing my own compiler. Yes, it is about interpreters, but there are a lot of common techniques. The author explains along as he codes with the reader a simple version of a scripting language in Java and a more sophisticated and performant version in C. He names shortcuts, simplifications, reasons to take a certain way over alternatives because there's only so much space in a book, and in the end you have made your interpreter. It was said that the printing quality is bad because some lines fade: this is on purpose, to show where in existing code (faded lines) a new snipped (bold lines) belongs. At no time I had a problem reading, and my eyes are not the best. The only critique I have: would have been perfect if there was a list of literature on the subject languages, interpreters, compilers. Strongly recommended with 4.8 rounded up to 5 stars for people who like a hands on approach.
Y**Y
Great book for beginners looking to learn compilers/interpreters/virtual machines
This book is well-written, easy to understand (for someone who has prior programming experience in Java/C), and comes with a complete example code base with step-by-step instructions for readers to replicate the example implementation. Reading this book would be a great starting point for someone who is looking to learn how programming languages are implemented, or to study how to build an interpreter and a runtime with examples. Being beginner-friendly makes it *correct, but not comprehensive*, as the author has noted in the book. Hence it isn't suitable for someone who wants an in-depth and comprehensive view of, say, PL theory, optimization techniques etc. Overall, I think it is a great book and has recommended it to many of my friends. However, I am giving it 4 stars because it is one of the rare cases in which I find that it is actually easier to read the book electronically, mostly because the book is printed in grayscale, which makes the code snippets (especially syntax highlighting and the "grayed-out" lines) a little hard to read. There is a free web version of this book available, and I had probably read over 80% of the book electronically.
R**Y
a gem for those who wish to learn about and build compilers
This book is a gem for those who wish to learn about and build compilers. It gets the balance between teaching you concepts and then showing you how to do it. It builds both the concepts and the code necessary step by step, and each step is easy to consume. Before you know it, you've already mastered and coded up what would have seem like a daunting task. The choice of teaching you to build the compiler twice, first in a higher level language to get you familiar with the end to end process, and the second exposes you to very advanced techniques in C such as byte code single pass generation and execution, garbage collection, efficient implementation of closures, etc., also dramatically simplified the overall learning experience.
I**A
Great book !
Nice book, the quality of the book itself is really good, would definitely recommend reading this one if you’re into that kind of work.
A**R
a great buy
very good book... well built... very well printed. Although, the book is available online, it is good to have a paper book.
C**N
Practical, Easy, Demystifying
It makes all topics easy to digest. It's so satisfying to see the interpreter slowly become more powerful. You will go through many interesting cs topics, like closures and garbage collectors. Many chapters ends with additional notes that analyze the implementation choice between different real languages.
R**R
Great Book!
Teaches about compilers, interpreters and language runtime in a hands-on, pragmatic and accessible way. Great reading!
H**S
De lo mejor que he leído con respecto a intérpretes/compiladores
Si alguna vez quisiste saber cómo escribir un intérprete de un lenguaje de programación de (relativamente) alto nivel, este es un gran libro. El autor empieza definiendo el lenguaje que quiere implementar (Lox) y luego desarrollo dos intérpretes para este lenguaje, uno en Java (para entender las bases) y luego otro mucho más rápido en C, pero también más complejo, en C. Se trata de un libro ameno, escrito por un experto que conoce el tema a fondo y que te permitirá aprender todos los conceptos fundamentales. ¡Altamente recomendado!
M**O
Un must have pour tous ceux qui sont intéressés pas des interpréteurs ou des compilateurs et des VM
Excellent. Pour tous les niveau (ok, il faut quand même savoir développer à la base). Absolument limpide. Couvre la création d'un interprète, d'une machine virtuelle pour exécuter du byte code et le compilateur pour générer ce byte code. Un vrai bijou
Trustpilot
3 weeks ago
3 weeks ago