Finally Solving the Expression Problem
summary
Claim: Swift final tagless protocols (static methods returning Self) legitimately solve the expression problem. Shows a concrete DSL for view hierarchies, generic builder functions, and concrete interpreters that render to UIKit, render to HTML and render to PDF. Demonstrates adding new view kinds by inheriting protocols, explains the compiler-enforced safety, and sketches other domains (diagrams, effects, arithmetic). Implementation details, code patterns, and working examples are present so it’s useful if wanting an actionable solution.
AI-written summary · about
chapters (7)
- 0:00Start
- 5:36Add a New View Type
- 5:57The Expression Problem
- 10:07Build a Hierarchy
- 13:51Diagrams
- 14:05Layering of Shapes
- 14:26Side Effects








