Paper of the Week: Worlds: Controlling the Scope of Side Effects
This is part of our “Paper of the Week” series. For more info, check out our introductory blog post.
This week’s paper is Worlds: Controlling the Scope of Side Effects by Alessandro Warth, Yoshiki Ohshima, Ted Kaehler and Alan Kay. It was presented at ECOOP 2011 and is based on part of Warth’s Ph.D. thesis Experiments with Programming Languages. When this paper was published, all four authors were researchers at Viewpoints Research Institute.
Worlds was submitted by Hacker School resident David Nolen, who shared the following:
Alan Kay’s VPRI group published this fascinating paper on a general pattern for controlling the scope of side effects. The formulation is object oriented in flavor but the observations and results are significant and may be arrived at by other means. Specifically, in the closing “Related” section they note that Worlds deliver the same benefits made possible by persistent data structures. This is one of the key papers that inspired my work around Om.
Compare the undo implementation I described for an Om based TodoMVC and the undo implementation described in section 3.2. They are surprisingly similar (I had not actually read the source in this section when devising my example). In section 3.3 they describe extension methods - this is available in ClojureScript via
specify. You can think of
specifyas an instance level type class extension that returns a new extended (equal) value. Internally Om uses this feature all over the place. In ClojureScript extension methods are very high performance - deep cloning with persistent data structures is O(1).
I think in the long run this paper will likely be one of the seminal references for anyone trying to reconcile the powerful modularity of stateful Object Oriented programming with the stunning properties derived from value oriented functional programming - particularly when attempting to apply these strategies to the computer programming domains that still exhibit staggering complexity at scale (this is what VPRI is interested in) - namely UI programming.
Here’s the abstract from the paper:
Read Along is a way for you to participate in Paper of the Week. If you want to take part, all you have to do is read the paper, make something small in response (code or prose), and email us a link to what you made by noon Eastern Time next Monday.