preferences-functional-reactive-programming
Functional reactive programming
Purpose and scope
This document establishes Functional Reactive Programming as the foundational paradigm from which event sourcing, CQRS, the Decider pattern, signals, and reactive streams are derived consequences rather than independent inventions. The shared insight across all these patterns is a fundamental inversion: privileging change over state, storing velocities rather than positions, and deriving current state through integration (folding) over the differential history.
This document addresses the "why" that unifies patterns documented elsewhere. It provides the conceptual framework showing that these patterns are not design choices but mathematical necessities once you commit to modeling interactive systems that unfold over time.
For the detailed categorical structures (F-algebras, coalgebras, comonads, profunctors) and their formal definitions, see theoretical-foundations.md.
For practical event sourcing implementation, see event-sourcing.md.
For the Decider pattern and aggregate design, see domain-modeling.md.
For SSE-based reactive hypermedia, see hypermedia-development/07-event-architecture.md.
For distributed reactive streams and backpressure, see distributed-systems.md.
The relationship between this document and theoretical-foundations.md is that of perspective to mechanism: this document explains why certain structures are forced by the problem domain of interactive systems, while theoretical-foundations.md details what those structures are and how they compose.