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
15 weeks 3 days ago
19 weeks 5 days ago
21 weeks 2 days ago
21 weeks 2 days ago
24 weeks 3 hours ago
28 weeks 4 days ago
28 weeks 4 days ago
29 weeks 13 hours ago
29 weeks 13 hours ago
31 weeks 6 days ago