Algebraic Data Type

Noun · Development

Definitions

  1. 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