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

Instructors

Will Crichton

Course assistants

Varun Ramesh
Stephanie Chen
Esther Goldstein

Calendar

Schedule

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 ( notes )

Assignment 1 out

TAPL - Chapter 3

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

TAPL - Chapter 9
Real World OCaml - Guided Tour

Lecture 2.2 (Wed): Algebraic data types ( notes )

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 ( notes )

TAPL - Chapter 20, 21

Lecture 3.2 (Wed): Polymorphism ( notes )

Assignment 2 due, Assignment 3 out

TAPL - Chapter 23

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

WebAssembly Reference Manual
Understanding WebAssembly text format

Lecture 4.2 (Wed): WebAssembly semantics ( notes )

Assignment 3 due, Assignment 4 out

WebAssembly Specification

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

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

Lecture 5.2 (Wed): Traits ( notes )

Assignment 4 due, Assignment 5 out

The Rust Book - Traits

Week 6: October 29
Lecture 6.1 (Mon): Smart pointers ( notes )

The Rust Book - Smart Pointers

Lecture 6.2 (Wed): Concurrency and data races ( notes )

Assignment 5 due, Assignment 6 out

The Rust Book - Fearless Concurrency
Zero-cost futures in Rust

Week 7: November 5
Lecture 7.1 (Mon): Guest lecture - Sergio Benitez, Stanford ( notes )

Typestates in Rust
A hammer you can only hold by the handle
Rusty Types for Solid Safety

Lecture 7.2 (Wed): Session types ( notes )

Assignment 6 due, Assignment 7 out

Session Types for Rust

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

The Evolution of Lua

Lecture 8.2 (Wed): Object systems ( notes )

Assignment 7 due, Assignment 8 out

Lua PIL - Object-Oriented Programming
Execution in the Kingdom of Nouns

November 19
No class for Thanksgiving!
Week 9: November 26
Lecture 9.1 (Mon): Performance
Lecture 9.2 (Wed): The future of programming languages

Assignment 8 due, final released

Week 10: December 3
Lecture 10.1 (Mon): Guest lecture - Yaron Minsky, Jane Street Capital
Lecture 10.2 (Wed): Guest lecture - Jean Yang, CMU
Week 11: December 10
Friday, December 14: Final due at 6:30pm