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 gonna be a blast.

Starting from main(), you’ll 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 will thoroughly understand because you wrote each one yourself.

You can read the whole book, for free, online:

Start Reading!

What’s the Catch?

The only wrinkle is that I haven’t quite finished writing it. I’m publishing it a chapter at a time, sort of like “Great Expectations” but with less grim Victorian poverty and better code samples. Since I can’t deliver chapters right to your doorstep, you may want to join the mailing list so you’ll know when the next piece is ready:

Who Are You?

I’m Bob Nystrom. I got bitten by the language bug eight 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 was a game developer for eight years at Electronic Arts. I wrote the best-selling book “Game Programming Patterns” based on what I learned there. Like this one, you can read it for free too, because I love you.

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