Algebraic Data Type
Noun · Development
Definitions
A composite type formed by combining other types using sum (tagged union / variant) and product (tuple / record) constructors, enabling the compiler to exhaustively check that every case is handled.
In plain English: A way of defining data in code so the computer can check you have handled every possible shape of that data, preventing bugs.
Example: "Model your domain with algebraic data types and the compiler will catch every unhandled variant at build time."
Related Terms
- Cabal
- Category
- Closure
- Computation Expression
- Cons
- Continuation
- Currying
- Discriminant
- Dynamic Typing
- Effect System
- Enum
- Error Union
- Forall
- Functor
- Generics
- GHC
- Higher-Order Function
- Immutability
- Implicit
- Lambda
- Lazy Evaluation
- List Comprehension
- Mapping
- Monad
- Multiple Dispatch
- Nullable
- Optional
- Record
- Reference Capability
- Sealed Class
- Trait
- Type Checker
- Type Class
- Type Inference
- Variant
- Type Erasure
- Covariance
- Phantom Type
- Structural Typing
- Nominal Typing
- Dependent Type
- Applicative Functor
- Match Expression
- Partial Function
- Partial Type
- Point-Free Style
- Reader Monad
- Record Type
- Reference Type
- Scan
- Side Effect
- Smart Constructor
- State Reducer
- Tagged Union
- Type Signature
- Category Theory