From Domain Models to Domain Languages with Tagless-Final
summary
Argues that tagless-final lifts domain models into type-safe DSLs by encoding syntax, types, and semantics in the host language so the compiler enforces correctness. Shows a tiny arithmetic DSL that evaluates 1+2-3 to 0, then builds a fiscal-period DSL whose single business program is interpreted three ways (evaluator, logger, code generator) so the same pure domain logic yields run results, audit logs, or generated code without changing the business code.
AI-written summary · about
chapters (8)
- 0:00Introduction
- 1:49Why domain models degrade
- 7:11Domain as a language
- 13:20Syntax types semantics
- 16:36Tagless-Final explained
- 22:31Defining semantics
- 27:38Benefits of tagless-final
- 31:59Conclusion
related talks
43mWrite your own domain specific language with F#
24mDesigning a DSL That Perfectly Solves Your Problem
51mDomain Modeling Made Functional
46mAlgebraic Thinking for evolution of pure functional domain models
52mFunctional Patterns in Domain Modeling
35mDesigning Domain-Specific Languages: A Comparison of Three Approaches by Example
49mDomain Modeling Made Functional
20mThe Lands Platform: Lan.guages and D.omain S.yntax
