Media Summary: The formal syntax and semantics of variants. Textbook: Additional static checks performed by the compiler on pattern matches: exhaustiveness and unused branches. Textbook: ... The `option` type, which represents optional data. It's a principled way to avoid the plague of `null`. Textbook: ...
Exceptions Ocaml Programming Chapter 3 - Detailed Analysis & Overview
The formal syntax and semantics of variants. Textbook: Additional static checks performed by the compiler on pattern matches: exhaustiveness and unused branches. Textbook: ... The `option` type, which represents optional data. It's a principled way to avoid the plague of `null`. Textbook: ... Using pattern matching to access the pieces of a variant. Textbook: Examples of pattern matching with lists, records, and tuples. Textbook: The formal syntax and semantics of pattern matching. Textbook:
Examples of variants, which along with records are the primary kind of user-defined data types in The `function` keyword provides helpful syntactic sugar for pattern matching. Textbook: More about records vs. variants, and how variants can combine "one of" vs "each of" data. Textbook: ... The tradeoffs between data structure operations that raise