Trees that Grow
summary
Claims that Trees That Grow (Najd, Shayan and Peyton‑Jones, Simon, 2016) let syntax trees extend without breaking callers, implemented with type families, pattern synonyms, lenses/prisms/traversals and demonstrated on an aircraft data model and Python/Java examples. Practical problems appear: 18 type variables in a propulsion subtree, hitting a 26‑variable limit, and pattern‑match boilerplate. Alternatives tried are classy lenses, Backpack and row types; outcome: helps in places but does not universally solve the extensibility pain.
AI-written summary · about
chapters (19)
- 0:00Introduction
- 1:40Abstract
- 2:37Abstract Syntax
- 3:27The Expression Problem
- 15:41Algebra
- 22:21Type Family
- 23:16Pattern Matching
- 23:51Adding an Image
- 25:41Adding a Field
- 27:06Adding a constructor
- 30:41Traversal
- 31:16Prisms
- 32:16Complaints
- 33:46The Problem
- 36:16Backpack
- 37:51Quantifiers
- 39:11Questions
- 41:41Example
- 46:31Commit
related talks
47mPattern mayhem: a binary tree in types
45mDepending on Types
19mAbstracting Gradual Typing Moving Forward : Precise and Space-Efficient
49mThe Trouble With Types
22mThink you know TypeScript? Think again.
38mType Systems - The Good, Bad and Ugly
43mA Deep Dive into Advanced TypeScript: A Live Coding Expedition
38mUnderstanding TypeScript's Structural Type System
