Course summary

CS 242 explores models of computation, both old, like functional programming with the lambda calculus (circa 1930), and new, like memory-safe systems programming with Rust (circa 2010). The study of programming languages is equal parts systems and theory, looking at how a rigorous understanding of the syntax, structure, and semantics of computation enables formal reasoning about the behavior and properties of complex real-world systems. In light of today’s Cambrian explosion of new programming languages, this course also seeks to provide a conceptual clarity on how to compare and contrast the multitude of programming languages, models, and paradigms in the modern programming landscape. See the schedule below for full topic list. Prerequisites: 103, 110.

Previous iterations of this course: Fall 2017.

Course info


Will Crichton

Course assistants

Varun Ramesh

Stephanie Chen

Esther Goldstein



Lectures Assignments Readings
Week 1: September 24
Lecture 1.1 (Mon): Introduction ( slides , notes )

A Brief, Incomplete, and Mostly Wrong History of Programming Languages

Lecture 1.2 (Wed): Lambda calculus

Assignment 1 out

TAPL - Chapter 3

Week 2: October 1
Lecture 2.1 (Mon): Type systems

TAPL - Chapter 9
Real World OCaml - Guided Tour

Lecture 2.2 (Wed): Algebraic data types

Assignment 1 due, Assignment 2 out

TAPL - Chapter 11
The algebra (and calculus!) of algebraic data types
Real World OCaml - Variants

Week 3: October 8
Lecture 3.1 (Mon): Recursion

TAPL - Chapter 20, 21

Lecture 3.2 (Wed): Polymorphism

Assignment 2 due, Assignment 3 out

TAPL - Chapter 23

Week 4: October 15
Lecture 4.1 (Mon): Stack machines and assembly

WebAssembly Reference Manual
Understanding WebAssembly text format

Lecture 4.2 (Wed): WebAssembly semantics

Assignment 3 due, Assignment 4 out

WebAssembly Specification

Week 5: October 22
Lecture 5.1 (Mon): Memory safety in Rust

The Rust Book - Understanding Ownership
The Rust Book - Smart Pointers
Rust container cheat sheet

Lecture 5.2 (Wed): Traits

Assignment 4 due, Assignment 5 out

The Rust Book - Traits

Week 6: October 29
Lecture 6.1 (Mon): Concurrency and data races

The Rust Book - Fearless Concurrency
The Rustnomicon - Data Races and Race Conditions

Lecture 6.2 (Wed): Asynchronous abstractions

Assignment 5 due, Assignment 6 out

Zero-cost futures in Rust
Removing green threads from Rust

Week 7: November 5
Lecture 7.1 (Mon): TBD
Lecture 7.2 (Wed): State machines and session types

Assignment 6 due, Assignment 7 out

Typestates in Rust
Session Types for Rust

Week 8: November 12
Lecture 8.1 (Mon): Dynamic typing

The Evolution of Lua

Lecture 8.2 (Wed): Object systems

Assignment 7 due, Assignment 8 out

Lua PIL - Object-Oriented Programming

November 19
No class for Thanksgiving!
Week 9: November 26
Lecture 9.1 (Mon): Performance
Lecture 9.2 (Wed): The future of programming languages
Week 10: December 3
Lecture 10.1 (Mon): Guest lecture - Yaron Minsky, Jane Street Capital
Lecture 10.2 (Wed): Guest lecture - Jean Yang, CMU

Assignment 8 due

Week 11: December 10
Friday, December 14: Final exam from 3:30pm - 6:30pm