What's Algebraic About Algebraic Effects?

2025-09-22
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.

Read more
Development

Visual Programming's Future: Beyond Nodes and Wires

2025-09-14
Visual Programming's Future: Beyond Nodes and Wires

This article explores the limitations of visual programming, arguing that it has long been trapped in the node-and-wire paradigm, neglecting the principle of "form follows function." Using CellPond as an example, the author highlights that its success lies in defining the underlying function (only four operations) first, with the form emerging naturally. The author further elaborates on the threefold meaning of "function": intrinsic nature, rationality, and algebra, and argues that visual programming should focus on leveraging the human visual cortex's pattern recognition capabilities to model problems, rather than simply mimicking textual programming. The article proposes modeling problems as entities and relationships, and utilizing visual elements (color, grouping, motion) to represent state changes, thus breaking through the limitations of existing visual programming and creating more powerful programming tools.

Read more
Development