[Main website]


Warth, Alessandro, Yoshiki Ohshima, Ted Kaehler, and Alan Kay. “Worlds: Controlling the Scope of Side Effects.” In ECOOP 2011 – Object-Oriented Programming, edited by Mira Mezini, 6813:179–203. Berlin, Heidelberg: Springer Berlin Heidelberg, 2011. https://doi.org/10.1007/978-3-642-22655-7_9.

Citations from the paper

But whereas the purpose of transactions is to provide a simple model for parallel programming, the goal of worlds is to provide a clean and flexible mechanism for controlling the scope of side effects. Unlike transactions, worlds are first-class values and are not tied to any particular control structure—a world can be stored in a variable to be revisited at a later time. This novel combination of design properties makes worlds more general (albeit more primitive) than transactions.

The world is a new language construct that reifies the notion of program state. All computation takes place inside a world, which captures all of the side effects—changes to global and local variables, arrays, objects’ instance variables, etc.—that happen inside it.

A programming language that supports worlds must provide some way for programmers to: – refer to the current world, – sprout a new world from an existing world, – commit a world’s changes to its parent world, and – execute code in a particular world.

Dok approach

MAYBE branches are managed using Doknil cntxs, and using a Pijul-like semantic for merging differences:

  • decide what to merge with the parent branch
  • decide what are the differences respect parent branch