What's Algebraic About Algebraic Effects?

This article delves into the meaning of "algebraic" in the context of programming, focusing on algebraic effects. The author argues that algebraicity in programming lies in its composability, achieved by constraining data structures and operations to guarantee specific system properties. CRDTs, for instance, leverage the algebraic structure of a semilattice to address data synchronization challenges in distributed systems. Algebraic effects extend this concept, allowing the composition of effects with guaranteed properties, thereby enhancing code composability and reliability. The author illustrates how to define algebraic properties to ensure specific behaviors using a key-value store example and points out that only dependent type languages like Coq or Lean can explicitly encode and prove these algebraic properties.