Finally Solving the Expression Problem
summary
Claims a practical solution to the expression problem in Swift by using protocols whose methods return Self so view constructors become static factory methods and interpreters are protocol conformances. Builds a small EnumKit-style DSL for view hierarchies, shows generic builders that compile to UIView, NSView, HTML and PDF, and demos diagrams and effect interpreters. Uses Swift generics, protocol instances and the Final Tagless style to add new view kinds and new renderers without editing the library, and it compiles and runs.
AI-written summary Β· about
chapters (7)
- 0:00Start
- 4:20Enum Kit
- 5:43Recursive Traversal
- 6:55Add New View Types
- 11:48Add New Views
- 12:06The View Hierarchy
- 16:40Arithmetic Expressions
related talks
17mFinally Solving the Expression Problem
23mDeclarative Programming in Swift
18mMaking Table Views Great Again!
39mSwift and You
31mThe Swift Behind SwiftUI
28mFlexible View Controller Interfaces With Swift 4
35mProtocols with Associated Types
48mLearning From Our Elders: Applying functional insights without losing Swift
