plai

Programming Languages: Application and Interpretation

This is the Web site for Programming Languages: Application and Interpretation, often referred to by its initials as PLAI (pronounce it like “play”). Over the years well over fifty academic institutions (that I know of) have used PLAI.

PLAI is designed for upper-level courses that introduce the main ideas of programming languages. In the US, it is designed for students in their second- through fourth-years of college, as well as starting graduate students. However, PLAI has been used with students much younger, including in a few select high school classes.

The Current (Third) Edition

The third edition finally came out in December 2022! For the foreseeable future I will be putting out two versions, “electronic” and “print”. The former has hyperlinks in its Table of Contents, while the latter has page numbers. Unfortunately, cross-references within the latter document are still hyperlinks (blame Google Docs), and will hence likely be useless on paper. Sorry.

Discussion Site

We have a Zulip chat for people who want to discuss the book. Note that the chat is primarily intended for educators, where we discuss conceptual topics, organization, design decisions, related materials, etc. It is not designed for asking homework questions, and people who abuse it may be banned.

Current Version

The current public release is version 3.2.2 (2023-02-26). There are two PDF versions:

There is now also an EPUB version:

The main issue with it is that some readers (like Apple Books) neither render a monospace typeface nor display background colors. Other readers do both just fine. So if you want the proper experience, use one that handles both.

One annoying problem is that the code is not formatted in a monospace typeface, which to my mind makes it a bit harder to read (and inline code may read like prose). However, most other aspects (including background coloring) have been preserved, and it looks quite usable.

Deprecated Version(s)

3.2.2 fixes a few annoying typos in version 3.2.1 (2023-01-10):

Its main difference from 3.2.0 (2022-12-08) is, in addition to numerous typo fixes, now including links to the full SMoL Tutor by Kuang-Chen Lu. Please be sure to do this self-paced tutor!

To save you having to download the book, here are direct links to the tutor:

Topic
scope
order
more scope
mutable variables
sequencing
vectors1
vectors2
the heap
lambda1
lambda2
lambda3
local

The material is intentionally broken down into a collection of short tutors so none should take too long (estimate 10—20 minutes each).

We strongly recommend that you do the tutors before you start on the book!

AFQ (Anticipated Frequent Questions)

Is the book free?

Yes, the book is available free-of-cost under a CC BY-NC-SA license.

Is there a paper edition?

Not yet. Every channel creates extra work, so I don’t want to take on the responsibility of making and maintaining this until I know it’s worthwhile. (You can always print a copy for yourself!)

If you’re interested in being able to purchase a printed copy, please vote on this issue. That will tell me that it’s worth the time to make one!

I thought you said you wouldn’t publish an EPUB version?

I did! I was trying to generate EPUB directly from Google Docs, and the result was pretty awful; I couldn’t imagine anyone using it. Then Jamie Cooper suggested Calibre. That didn’t seem any better…going from PDF. But generating HTML from Google Docs and having Calibre convert that to EPUB worked well enough that I was happy to make the result public. But I was still having frustrating monospace font problems, which are significant in this book. But then Pradeep Gowda dove in to figure it out, making the result extremely good!

What changed in the third edition?

Many, many things. Please read the Preface.

Did I miss 3.1?

There was an internal version at Brown in 2021. Since I hope to update this annually, I figured it’s easier for the public version numbers to track the year. Therefore, I’m retroactively dubbing that internal version 3.1. You didn’t miss anything.

How often do you intend to release versions?

Approximately one a year. While it’s attractive to authors to push new versions on a regular basis, treating books like software, that can be very disruptive to users.

When will the next edition come out?

I expect to revise the book during fall 2024 and release a new version sometime in the fourth quarter of the year.

How do I stay up-to-date with releases and the like?

Please join the group plai-notifications. It will be very low volume: postings only when there is something significant (on the order of at most a few a year). It is expressly not a discussion forum, to keep volume low.

Does that mean…

Yes, it means we’re counting major versions from 1, minor versions by year, and sub-minor versions from 0. If you find this appealing, you probably also like “scripting languages”, and you’ll like some chapters of the book; if you find it appalling, you’ll like other chapters.

How do I report problems, errors, suggestions, etc.?

Please use this repository.

Previous Editions

Who am I?

I’m Shriram Krishnamurthi.