In programming language theory, an algebraic data type (ADT) is a kind of composite type, i.e., a type constructed with multiple primitive data types. There are two main types of ADTs:
- Sum types — including variant types (like enums).
- Product types — including tuples or records (also called structs).
Language-specific
Functional programming languages introduce ADTs as first-class notions. Some non-FP languages also allow defining ADTs. For example:
- Sum types
- Product types
See also
- Abstract data type, also called ADTs