archives

Programming with Managed Time

To appear in Onward! 2014; abstract:

Most languages expose to programmers the computer’s ability to update memory at any time. But just as many languages now manage memory to unburden us from properly freeing memory, they should also manage time to unburden us from properly ordering updates to memory. Change then becomes human comprehensible: writes are seen by all affected reads, easing many programming tasks related to initialization, reactivity, and concurrency, and so on. Perceptible steady feedback is also provided on how code edits affect program execution as live programming. We propose time management as a general language feature to relate prior work and guide research into this unexplored design space.

We introduce Glitch as a form of managed time that replays code for an appearance of simultaneous state updates, avoiding the need for manual order. The key to such replay reaching a consistent program state is the ability to reorder and rollback state updates as needed, restricting the imperative model but still being quite expressive. Glitch is fully live: program executions can be replayed in an IDE and are incrementally revised under arbitrary code changes.

Written with Jonathan Edwards and heavily inspired by his blog post; there might have been a few LtU posts on this subject in the past also.

Also, if reading a paper isn't your thing, check out the essay + videos companion.