Domain Specific Type Systems
summary
A light, practical claim: macros implement a localized static typechecker for a Datomic DSL called Spectacular that emits precise errors and then hands inferred types to typed Clojure via unchecked casts so host code is checked. The implementation is a small bidirectional algorithm (no polymorphism, supports recursive links), it generates docs from specs, and it runs in production at SparkFund even though the repo lacks polished docs. Datomic is the target, and the approach demonstrably works.
AI-written summary · about
chapters (25)
- 0:00Introduction
- 0:17Outline
- 0:57What is domainspecific
- 2:05The job of programming
- 3:12Type structure
- 3:39Abstraction
- 4:35Compression
- 6:25Abstractions are specifications
- 8:00Inception
- 8:40Fable
- 9:15Complex
- 10:05The Twins
- 11:07Types are data structures
- 11:51Syntax
- 12:15Static vs Dynamic
- 16:02Definition and derivation
- 17:11Types as a design language
- 17:30How design programs work
- 18:40Types as design criteria
- 20:26Static types
- 21:04Premature optimization
- 23:16The atomic
- 25:52Type checking
- 31:04Type closure
- 33:28Type theory








