Variants are Not Unions
summary
Models tagged unions as keyword-tagged vectors and shows how core.match destructuring forces handling of each case, preventing nil-and-missing-key bugs. Shows a core.typed Union using value types so match inferers bind correct types most of the time, and a recursive lambda-calculus evaluator built from variants. Describes storing variants in Datomic as two rows per value and a simple Datomic schema, and integrating Herbert schemas and generators for validation and tests.
AI-written summary · about
chapters (9)
- 0:00Start
- 7:23Using the data
- 10:55Modeling AND
- 11:32Modeling OR
- 18:04(recursive!) TYPES
- 24:55A Loop Variant
- 26:26A Result Variant
- 28:52the schena
- 30:38Takeaways
related talks
40mBuilding a Data Platform with Datomic
40mCreating DSLs A tale of spec tacular success and failure
31mTesting Made Simple
01h 03mMaybe Not
28mDendrology
48mContracts & Clojure: The Best-Yet Compromise of Types and Tests
42mZeder - Production Rule Systems in Clojure
23mWith Great Composition Comes Great Responsibility
