The applied intersection of Programming Language Theory, Category Theory, and Logic to Computation. Designing a Program around pure functions and immutable data. Essentially, the mathematical way of programming, where functions behave like they do in math, and data consists of mathematical objects that have a single identity, not a changing one. Instead of changing the state of objects, data is transformed by being passed through a composition of functions.
Algebraic Pillars
The function paradigm consists of two pillars of algebraic computation.
- Structural Algebra
- Describes the shape of algebraic types
- Algebraic Type + Shape = Algebraic Data Type
- Sum Type
- Traffic light signal. Red or Yellow or Green.
- Product Type
- Coordinate. x and y and z.
- Sum Type
- Algebraic Type + Shape = Algebraic Data Type
- Describes the shape of algebraic types
- Operational Algebra
- Describes the behavior of algebraic types
- An algebraic type that has a particular behavior (e.g. operations and laws) is an Algebraic Structure
- Describes the behavior of algebraic types