A handbook for making programming languages.

This book contains everything you need 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. It’s a blast.

Starting from main(), you 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 write each one yourself.

And you can read the whole book, for free, online:

Start Reading!

I Want to Hold the Book in My Hands

Call me old-fashioned, but the word “book” to me still implies ink and flattened rectangles of wood pulp. This book is not quite there yet. The chapters are written, but I am still designing the print edition. If you want to know when that’s ready, have I got the mailing list for you:

Who Are You?

I’m Bob Nystrom. I got bitten by the language bug ten years ago when I was on paternity leave with a lot of free time between middle of the night feedings. Since then, I've cobbled together a number of languages of various ilk before worming my way into an honest-to-God, full-time programming language job. Today, I work at Google on the Dart language.

Before I fell in love with languages, I developed games at Electronic Arts for eight years. I wrote the best-selling book “Game Programming Patterns” based on what I learned there. You can read that book for free too, because I love you.

If you want to get in touch, you can email me at bob at this site's domain or find me (@munificentbob) on twitter. If you can’t get enough of my writing, I also have a blog. If you like the book, you’ll probably like it too.