Divergence


Defined in my 2016 paper, divergence represents any discrepancy between the runtime state of a program, and the state through which it can be authored. Typical sources of divergence include the program’s call stack, uninterpreted addresses within the heap, event listeners and typical sources of object representation such as vtables and the like.

In a tradition of materialised programming, divergence should be minimised, in order to reduce the mental burden on those trying to visualise the effects of their edits.

Closely related notions are the Gulf of Execution, and Gulf of Evaluation, originally coined by Don Norman in his 1988 Design of Everyday Things.

Jonathan Edwards centres bridging these gulfs in his 2005 paper Subtext: Uncovering the Simplicity of Programming:

The Gulf of Execution is the difficulty of translating a desired goal into an action to be executed. The Gulf of Evaluation is the difficulty of determining whether an observable state meets the desired goals.

and announces

Subtext is a new medium in which the representation of a program is the same thing as its execution.

Subtext is thus a medium or substrate in which divergence is minimised.

However, it seems that a slight pun may emerge between these two notions of “execution” – one, the execution of the user’s intention, and the other, the execution of the program. I argue that by reframing the activity of substrates away from execution in the programming sense, there is better scope for the minimisation of divergence to bridge these gulfs, in the typical case where minimal or no computation is required.

Instead of execution we focus on the correlation or organisation of state, in line with the responsibilities of an integration domain. Computation, where necessary, is expressed in a dialect of good functions in a syntax which will be familiar to users from grade school or spreadsheets.