Worlds: Controlling the Scope of Side Effects by Alessandro Warth and Alan Kay, 2008.
The state of an imperative program -— e.g., the values stored in global and local variables, objects’ instance variables, and arrays—changes as its statements are executed. These changes, or side effects, are visible globally: when one part of the program modiï¬es an object, every other part that holds a reference to the same object (either directly or indirectly) is also affected. This paper introduces worlds, a language construct that reiï¬es the notion of program state, and enables programmers to control the scope of side effects. We investigate this idea as an extension of JavaScript, and provide examples that illustrate some of the interesting idioms that it makes possible.
This introduces a new programming construct that's just the kind I love: they stimulate the imagination and provide simple and strong dynamic invariants to make programs easy to reason about.
Recent comments
13 weeks 2 days ago
13 weeks 2 days ago
13 weeks 2 days ago
35 weeks 3 days ago
39 weeks 5 days ago
41 weeks 3 days ago
41 weeks 3 days ago
44 weeks 22 hours ago
48 weeks 5 days ago
48 weeks 5 days ago