Generics in protocol extensions
summary
Shows a Swift technique for building a heterogeneous list and implementing HList append using protocol extensions without true generics. Uses successive wrapper types (App1, App3, App5) and an "ev" witness type to force associated types to concrete types; the proof-of-concept compiles and runs but needs many explicit type annotations because Swift’s type inference cannot pick the ev results, so the author finds it fragile for production.
AI-written summary · about
chapters (9)
- 0:00Introduction
- 1:55Tuples and lists
- 4:34Heterogeneous lists
- 7:13Protocol basics
- 9:30Protocol extensions
- 11:41List append
- 13:22Heterogeneous append
- 17:50Type inference limits
- 18:56Summary








