Pragmatic Object-oriented Tagless Final
summary
Short theory plus two years of practical experience with tagless final, claiming it helps testability, effects tracking, context polymorphism but costs complexity and discipline. Recommends encoding services as traits/classes (module pattern), prefer minimal constraints — use MonadError only unless expert, avoid MonadTransformer types in public interfaces and global F, enable variance for flexibility. Shows a concrete pattern: convert Slick DBIO to Task with a natural transformation (ExecutionContext + DB config) and mapK to compose DB repositories with the app F; this approach works in practice.
AI-written summary · about
chapters (17)
- 0:00Introduction
- 1:50Theory overview
- 3:14Expression problem explained
- 7:10Initial vs final encoding
- 10:20Tagged vs tagless encoding
- 12:09Tagless final explained
- 13:34Why use tagless final
- 16:26Libraries vs applications
- 19:13Benefits of tagless final
- 20:15Tagless final isn't free
- 22:06Using modules and interfaces
- 25:00Constraints and type classes
- 27:10Avoid monad transformers
- 28:34Use covariance
- 29:15Advanced tagless final
- 32:48Final remarks
- 33:54Q&A
