Course summary

CS 242 explores the concepts, design decisions, and tradeoffs underlying the programming languages of today and tomorrow. Specifically, this class focuses on three themes:

  1. Scripting languages: Understanding the expressive power afforded by dynamic typing, reflection, metaprogramming, and runtime extensibility. When your language assumes nothing about your program, how far can you go?

  2. Functional languages: Examining the effects of complex static type systems and functional programming idioms on structuring programs and proving statements about them. When your language knows a lot about your program, what do you gain?

  3. Systems languages: Exploring how language constructs can help programmers manage their hardware with both safety and performance. What are the costs of the abstractions afforded by higher level languages?

Course info

Instructors


Will Crichton

Course assistants


Varun Ramesh

Jintian Liang

John Clow

Calendar

Schedule

Topics Readings
Week 1: September 25
Lecture 1.1 (Mon): Introduction (slides) A Brief, Incomplete, and Mostly Wrong History of Programming Languages
Lecture 1.2 (Wed): Lua (slides, lua.lua) The Evolution of Lua
Assignment 1: RPC Library
Week 2: October 2
Lecture 2.1 (Mon): Object systems (slides, objects.lua) Lua PIL - Object-Oriented Programming
Execution in the Kingdom of Nouns
Lecture 2.2 (Wed): Embedded languages (slides, code) Lua PIL - An Overview of the C API
Mike Pall (LuaJIT creator) on embedding Lua
Assignment 2: Roguelike
Week 3: October 9
Lecture 3.1 (Mon): OCaml (slides, code.ml) Learn X in Y Minutes - OCaml
Real World OCaml
Lecture 3.2 (Wed): Lambda calculus (notes, interpreter.ml) PFPL - Chapter 4, 5, and 6
TAPL - Chapters 8 and 9
Assignment 3: Lambda Interpreter
Week 4: October 16
Lecture 4.1 (Mon): Algebraic data types and general recursion (notes) The algebra (and calculus!) of algebraic data types
TAPL - 11.5-11.12
Lecture 4.2 (Wed): Polymorphism and existential types (notes) TAPL - 23, 24
Assignment 4: Type Extensions
Week 5: October 23
Lecture 5.1 (Mon): Control flow (code) Lua PIL - Coroutines
Real World OCaml - Exceptions
Lecture 5.2 (Wed): Logic programming (notes, code) Datalog User Manual
Datalog formal foundations
Assignment 5: Logic Engine
Week 6: October 30
Lecture 6.1 (Mon): Rust (code) The Rust Programming Language
Learn X in Y Minutes - Rust
Lecture 6.2 (Wed): Memory management (slides, code) Understanding Ownership and Smart Pointers
Rust container cheat sheet
Assignment 6: RIIR
Week 7: November 6
Lecture 7.1 (Mon): Concurrency (slides, code) Fearless Concurrency
Lecture 7.2 (Wed): Parallelism (slides, code) Why Parallelism?
Parallel Programming Basics
Assignment 7: SparkLite
Week 8: November 13
Lecture 8.1 (Mon): SMT with Clark Barrett (slides) Satisfiability Modulo Theories
Lecture 8.2 (Wed): Optimizing virtual machines (slides, code) Visualizing Garbage Collection Algorithms
The Black Magic of (Java) Method Dispatch
Assignment: Final project!
Week 9: November 20
No class!
Week 10: November 27
Lecture 10.1 (Mon): Behind the scenes of Rust with Alex Crichton (slides) The Rust Community
Rust on GitHub
Lecture 10.2 (Wed): Metaprogramming (slides, code) A taxonomy of metaprogramming systems
Assignment: Final project!
Week 11: December 4
Lecture 11.1 (Mon): Side effects, dynamic scoping, and laziness with John and Varun (John's slides, Varun's slides) Real World OCaml - Imperative Programming
Dynamic scoping in Lua
Lazy Evaluation in Haskell
Lecture 11.2 (Wed): Programming languages of the future (slides) "What's next?"
Near Future of Programming Languages
Assignment: Final project!
Week 12: December 11
December 15, 3:30pm-6:30pm: Final project presentations