9 articles
← Back to all tagsAlgebraic type theory offers us an elegant correspondence between data structures and elementary arithmetic.
Algebraic data types (ADTs) form the foundation of modeling in typed functional languages, and their influence now extends far beyond.
A total function is one that terminates and produces a valid value for every input in its declared domain.
This phrase, popularized by Yaron Minsky in the context of OCaml, captures the very essence of a defensive approach to modeling: rather than verifying after the fact that a state is valid, we structur...
Alexis King's article, published in 2019, crystallized an intuition that many functional programmers carried without necessarily knowing how to articulate it.
An aggregate in Domain-Driven Design is fundamentally a guardian of invariants: it encapsulates a cluster of entities and value objects whose coherence must be maintained at each transaction.
An isomorphism between two types A and B is a pair of functions to : A → B and from : B → A such that from(to(a)) = a and to(from(b)) = b for any value.
Beyond classical typing, certain systems allow encoding finer properties. The compiler then becomes a proof assistant, enabling enforcement of even more precise business invariants.
Greg Young, in his foundational documents on CQRS, introduces an enlightening distinction between two interface styles.