1. 20

I’m taking a programming languages theory class this semester and I was pondering which book to buy to accompany the class. The teachers gives a few book recommendations, but none of them are obligatory. I’m only counting on buying one for now and I’d like to get a book that will stand for the ages.

Class website: http://www.iro.umontreal.ca/~monnier/2035/ (in french)

  • David A. Watt, Programming Language Design Concepts, John Wiley & Sons.
  • Ravi Sethi, Programming Languages – Concepts and Constructs, Addison-Wesley.
  • Graham Hutton, Programming in Haskell, Cambridge University Press.
  • Benjamin C. Pierce, Types and Programming Languages, MIT Press.
  • Simon Thompson, Haskell: The Craft of Functional Programming, Addison-Wesley.
  • Paul Hudak, The Haskell School of Expression, Cambridge University Press.

I’m also tempted by this one: Programming Language Pragmatics

I’ve been recommended TAPL before, but seeing as this isnt a class thats strictly about type systems, I’d like to get a more general one and read TAPL later.


  2. 9

    Benjamin C. Pierce, Types and Programming Languages, MIT Press.

    That’s the one you want. I’m biased towards ML (vs Haskell), and I think the book is, too (it’s not a Haskell book). You can get all six, sure, but if you had to get one that’s the one.

    1. 3

      Software Foundations is also good, and online for free.

      1. 3

        +1 for this. I’m using TaPL in my PL class this quarter and it’s awesome. Super well written and ML is great for this class - the work involves writing successively more complex interpreters for successively more complex toy languages. We’re not sticking strictly to the book, but the sections our prof has pointed us to have been great.

        1. 1

          I also highly recommend TAPL.

          I’ve been recommended TAPL before, but seeing as this isnt a class thats strictly about type systems, I’d like to get a more general one and read TAPL later.

          TAPL isn’t just about types neither - it’s types AND programming languages.

          Practical Foundations for Programming Languages is also very good.

          1. 1

            +1 for PFPL. It covers more material in fewer pages than TaPL, and it’s more up to date.

          2. 1

            There are lots of examples in this book, which I have found very helpful.

          3. 7

            Programming Languages: Application and Interpretation (PLAI) is pretty good, and has the added benefit of being free online.


            Essentials of Programming Languages is another good intro PLT book.

            Programming Language Pragmatics is a good book, and it’s useful. I have a copy. If I lost it, I’d replace it. I refer to it occasionally.

            Whether it is a good choice as the primary text for a PLT class depends on the specific PLT class.

            Programming Language Pragmatics is basically a large collection of small sections about specific programming language features. Each feature is introduced, described, and several code snippets in different languages are provided to illustrate the use of that feature (by the end of the book, dozens of languages have been mentioned). What is conspicuously absent is the theoretical basis for the feature and any real detail about how the feature is actually implemented. (TLDR: There’s a reason the book is called “Programming Language Pragmatics” rather than “Programming Language Theory.”)

            If your PLT course is about “learn about using a bunch of different programming language features,” then Programming Language Pragmatics makes a lot of sense as a primary text.

            Personally, I think that’s a perfectly reasonable subject for a course, but I wouldn’t call that course “Programming Language Theory.”

            If your PLT course is about “learn the theoretical basis of programming languages and use that theory to implement a simple programming language and several variations of it,” or something similar, then I think Programming Language Pragmatics is a poor choice - that just isn’t what the book is about. It might be handy if you’re having trouble understanding what the pieces you’re building do, but it won’t really help you build them.

            As an example, you mention type systems. Programming Language Pragmatics only has a few pages total on type systems, type checking, and type inference. There’s no mathematical description of types, no discussion of how to actually DO type checking, and no discussion of how to actually DO type inference. The entire section basically boils down to “some programming languages have types, and will make sure that the types match up - some languages will even figure out the types for you!”

            1. 9

              Please note that there’s also a second edition of PLAI, which is also available at the same link:


              I think the second edition is much better than the first. (Of course, I’m a bit biased!) It’s the result of teaching the first edition for about a decade, finding much better ways of explaining its concepts, and eventually transcribing those better ways back into the book.

              The language of implementation is also slightly different. This has some advantages and disadvantages.

              Incidentally, the second edition has as of a week or two ago just been translated into Chinese, though that may not be of must interest to people on an English-language thread. (-:

              1. 3

                This was what we used in our first level PL class (at Cal Poly), and I just want to say thanks for writing such an easy to approach book!

                While there wasn’t much about types, I found it was perfect for the initial dip to get the context of types while making a basic PL.

                1. 2

                  My pleasure — thanks! There isn’t much on types because I didn’t see the value in producing a watered-down version of TAPL. Rather, I show people the notation and what they need to know so that they can read TAPL.

                2. 2

                  I’ll have to take a look at the second edition, I enjoyed the first.

                  Thank you for your generosity in making such a valuable resource available at no cost.

                  1. 1

                    Thank you kindly! It’s a delight.

                3. 1

                  So I “think” the course is a bit of both. But I’ve only had the intro yet and I’m doing the first exercise tonight. So I’ve yet to have a full understanding of how the course will be.

                  For instance, most of the intro talked about BNF, programming paradigms and a short intro of different languages. The teacher did mention hoping that everyone would, at the very least, understand closures perfectly by the end of the course.

                4. 7

                  There’s a great list of resources compiled by Steven Shaw. It’s very broad but divided into categories.

                  1. 2

                    That’s a great list, though now I’m definitely feeling paralyzed by choice haha

                  2. 6

                    I posted a similar question some time ago on Reddit, and one of the recommendations was “Practical Foundations for Programming Languages” by Robert Harper. I actually ended up purchasing it.

                    I’ve been going through it on my free time and I quite enjoy the writing.

                    1. 3

                      Thanks for all the recommendations crustaceans.

                      I believe I’ll indulge myself and buy both TAPL and Pragmatics. And I’ll also find a way of getting PLAI on my kobo.

                      1. 3

                        I found Scott’s book (Programming Language Pragmatics) to be a pretty good, but I must admit that I haven’t looked at the newer versions. I taught a PL course with it about 15 years ago and it worked well. The material it covers is essentially timeless, so I doubt you’ll go wrong with it.

                        I’ve heard good things about Harper’s book as well.

                        1. 3

                          Further recommendations from past offerings of @shriram’s Programming Language Theory course:

                          I’ve personally referenced both Design Concepts in Programming Languages and TAPL quite a bit. Redex is a really fantastic tool for experimenting with executable operational reduction semantics.

                          1. 1

                            “Design Concepts” could be a bit heavy for a first course in PLT. I’d look at it after you get into the material a bit further. It seems like a decent book, though. I have to sit down and get through it some time.

                          2. 3

                            If you’re looking for something general, I’d eliminate Programming in Haskell, Haskell: The Craft of Functional Programming and The Haskell School of Expression from consideration – or put them aside for later.

                            Programming in Haskell and Haskell: The Craft of Functional Programming would be useful to you if you wanted to learn Haskell and functional programming. Likewise for The Haskell School of Expression, though this would one is the sort of must-read for Haskell developers that Kernighan & Ritchie’s The C Programming Language, 2nd Ed is for C hackers; a book about the language by one of its late creators.

                            I’ve read both David Watt’s and Ravi Sethi’s books, but I can’t recommend either. Watt’s provides most of his examples in Ada, with most of the rest in Java and C. He tends to give short shrift to dynamically typed and interpreted languages. I found Sethi’s book repetitive, and I don’t think he’s had a new edition since 2000.

                            It’s not on the list, but you might want to consider Michael L. Scott’s Programming Language Pragmatics. It’s much more recent, and at almost 1000 pages likely to be much more comprehensive.

                            1. 2

                              I think the teacher intended those mostly for non-haskell users, since I already know haskell, I probably shouldnt of included them in the list, but did for completeness.

                            2. 3

                              Salut mec! I did my undergrad at UdeM and I don’t recall needing a book for this class. I did the class with Marc Feeley and it was sufficient to attend the lectures and to make sure to preview and review the slides. The projects were good, and if you apply yourself and do them, I think you’ll get a lot out of this class without spending $100. TAPL is a cool book, but that would be more useful for Stephan’s grad-level class or a class by Brigitte Pientka at McGill.

                              Good luck!

                              1. 2

                                I’m mostly looking into this for my personal benefit, this is the only class I’m taking this semester (As I also work full time) and I’d like to get really involved into the subject. I will probably take other classes in the same vein over the next semesters.

                                And spending way too much money on books is my guilty pleasure.

                                1. 1

                                  Then I heartily recommend TAPL, it’s a great book, even though it takes dedication to get through it all.

                                  Also, www.alibris.com sometimes has pretty good deals on used CS books; I got the Dragon Book (compiler design) for $1 + shipping. There’s no reason why a guilty pleasure should break your wallet :D

                                  1. 1

                                    Nice, I didnt know that website.

                              2. 2

                                I’m halfway through TAPL right now and it’s definitely worth it!

                                1. 2

                                  TAPL is all you need, there’s more in it than just types.