Taming the context beast
summary
Claim: plain Scala 3 context functions fail on type inference and composition so you cannot reliably build a whole business app with them alone. Using Scala 3 transparent inline macros and compile‑time reflection the author implements a tiny prototype library called lore that generates intersection using types and provides flatMap/for‑comprehension wrappers. It works for many examples (DSLs, composed tasks) but is an early three‑file prototype that can crash the compiler and is untested and potentially unsound.
AI-written summary · about
chapters (8)
- 0:00Introduction
- 3:09Understanding context
- 9:31Using context functions
- 12:06Building custom DSLs
- 16:04Business applications
- 27:20Compiler type behavior
- 39:17Macro-based solution
- 49:04Conclusion and Q&A








