next up previous contents index
Next: Considerations for Real-Time Up: Terminology Previous: Flavors   Contents   Index


Dreams

We eventually realized the significance of the fact that everything in a program is dynamic -- changing with the passage of time as the program executes. This parallels real life as we live it. Each person has a slightly different perception of reality. A person has a different perception of his world when he is dreaming than when he is awake. In a dream, reality is warped, either slightly, or greatly, depending upon the dream. Much of a dream mirrors reality, but some things are not quite the same; they differ enough to make a dream world. When we are dreaming, we think we are awake, but we are not perceiving reality: we are perceiving the dream as though it were reality. We act out our lives in a dream, and experience the dream dynamically, just as we do reality. While we are dreaming, we cannot tell the difference.

We then considered recursive dreams -- dreams that started not from the wakeful aware state of reality, but from within another dream. Here the warping is not with respect to reality, but with respect to the dream within which this other dream started. We saw great expressive power. We saw information hiding. We saw multiple inheritance. We saw polymorphism. We saw a new way for us to think about the OOP problem.

The dream is the object. Its purpose is to provide a way to warp the meanings of certain words, run some code (interpret the message), and then unwarp the meanings of the warped words. The result looks like a system based upon operator shadowing, since Forth is an operator language. Another view would say that it is a frame-based system where all the frames are related by exception links. The use of exception links in a frame based system of inheritance is not without theoretical difficulties. The difficulties of exceptions in inheritance based systems of representation are well explored by Brachman [Bra85].

The new approach lent itself to a very clean implementation, and a fast, deterministic run-time execution. It is based upon the nesting of closures to shadow the bindings of selected operators. The inheritance is multiple, but unlike Flavors, which exhibits lexical scoping, the scoping in Dreams is dynamic.

Dreams uses dynamic scoping because a program is dynamic itself, and also because it permits a very run-time efficient and predictable implementation, as far as execution timing is concerned. The dynamic scoping seemed natural for the Dreams way of thinking, and the fall-out was that it can be made to run faster than lexical scoping, and that it is simpler to implement.

Lisp Machines Inc., the ``other'' Lisp machine company (besides Symbolics), proposed an OOP called Object-Lisp [Tel89, 142-144] that was based on the same idea of nested closures and operator shadowing. They submitted the specification as a candidate for an OOP standard for Common Lisp [Ste90], but this was defeated in favor of CLOS [Kee88,Ste90] instead.


next up previous contents index
Next: Considerations for Real-Time Up: Terminology Previous: Flavors   Contents   Index
Robert J. Brown
1999-09-26