Discriminated union, or disjoint union, is a data structure used to hold a value that could take on several different, but fixed types. They are also known as "sum types" in type theory. For [ocaml] use [variant] instead.
Discriminated union, or disjoint union, is a data structure used to hold a value that could take on several different, but fixed types.
Discriminated unions are most important in functional languages such as ml and haskell, where the compiler is able to verify that all cases of a disjoint union are always handled, avoiding many types of errors.
For a brief history of discriminated union, please visit its wikipedia page.