[Note: this review is about the 3rd edition of the book]

This book is a detailed overview of some fundamental ideas in the design of programming languages. It teaches by presenting toy languages that demonstrate these ideas, with a full interpreter for every language (implemented in Scheme). After discussing some basic concepts like scoping, it gets into the ways state can exist in a language; then a whole chapter deals with continuation-passing style. This chapter also describes exceptions, coroutines and threads (all implemented with continuations). Other chapters discuss module systems and object-oriented programming.

The book was created as a companion/summary of a university course. When read stand-alone, it's not very easy to get through due to the huge number of concepts presented and discussed in fairly limited space (~350 pages). IMHO the authors could spend more time explaining and demonstrating the concepts before jumping into implementation - but maybe as a companion to lectures it's not really necessary. But this is definitely something to take into account if you're just reading the book; it's not for beginners.

I went through this book in a fairly detailed way (not quite like my SICP journey, but not very far from it). It took me several months of spending a couple of hours a week on it, and I wrote almost 10,000 lines of Clojure code implementing most of the interpreters (and some of the exercises) described in it. Clojure was a good choice. It's sufficiently similar to Scheme that the concepts translate without too much trouble; on the other hand, it is a different language so mindless copy-pasting doesn't work. I ran out of steam somewhere in the middle of the penultimate chapter (on Modules) and stopped implementing, since the concepts of Modules and OOP seemed more familiar and less interesting.

My favorite part was, no doubt, the chapter on continuations. It helped me understand concepts like CPS and trampolines to a deeper extent than ever before. For this, I'm forever thankful to the authors.

It's hard to say how beneficial a lithter skimming of this book can be. Without implementing the interpreters, the discussion is fairly weak. Implementing them takes time and code in advanced chapters builds on top of more code in earlier chapters. I hope this review helps folks decide whether the book is worth it, and feel free to ask in comments if I could clarify anything else.


Comments

comments powered by Disqus