Coherent Reaction by Johathan Edwards
Side effects are both the essence and bane of imperative programming.
The programmer must carefully coordinate actions
to manage their side effects upon each other. Such coordination
is complex, error-prone, and fragile. Coherent reaction
is a new model of change-driven computation that coordinates
effects automatically. State changes trigger events
called reactions that in turn change other states. A coherent
execution order is one in which each reaction executes before
any others that are affected by its changes. A coherent
order is discovered iteratively by detecting incoherencies as
they occur and backtracking their effects. Unlike alternative
solutions, much of the power of imperative programming is
retained, as is the common sense notion of mutable state.
Automatically coordinating actions lets the programmer express
what to do, not when to do it.
Coherence
is not a problem of constraint satisfaction — it is a problem
of constraint discovery. Previously there have been two
alternative solutions: reduce the expressive power of the language
so that constraint discovery becomes decidable (as in
state machines and dataflow languages), or leave it to the
programmer to deal with.
Recent comments
22 weeks 6 days ago
22 weeks 6 days ago
22 weeks 6 days ago
45 weeks 19 hours ago
49 weeks 2 days ago
50 weeks 6 days ago
50 weeks 6 days ago
1 year 1 week ago
1 year 6 weeks ago
1 year 6 weeks ago