Rating is available when the video has been rented.
This feature is not available right now. Please try again later.
Published on Nov 21, 2014
Variants are Not Unions
Some of the most confounding design problems occur when a value can be more than one type of thing. Variants, a.k.a. tagged unions, are an elegant solution to this problem that is not supported in an obvious way in Clojure and is not supported in most mainstream languages or databases. I'll demonstrate how and when to use tagged unions in Clojure, including a pattern-matching destructor and use with core.typed and storage in Datomic.