On the Expressive Power of Programming Languages
summary
Paper formalizes when a feature truly adds power by using observational/operational equivalence: two terms are equal iff every program context yields the same termination behavior. It proves that purely local macro (Las Vegas) transformations cannot create distinctions, and then constructs concrete counterexamples: adding a halt/exit lets one divergent/eager pair separate, adding mutable state enables a counting context to distinguish single vs repeated calls, and a truthy extended if exposes dead code versus live code. Practical homework: JavaScript with with and Python generators.
AI-written summary · about
chapters (14)
- 0:00Introduction and personal story
- 4:18Defining expressive power
- 9:45Intuition about compilation and rewrites
- 13:14Local rewrites and Las Vegas principle
- 15:21Formalizing expressiveness
- 21:24Equality is hard
- 29:09Observational equivalence
- 34:02Key theorem and expressiveness
- 35:51Adding halt to a language
- 40:50Adding state to a pure language
- 44:00Faulty if expressions
- 48:40Summary and implications
- 50:44Homework and closing remarks
- 52:49Q&A session
