[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: globals considered harmfull.



Hi folks --

This present discussion dovetails with something I have been thinking about
exploring for some time -- the idea is to have a stack or tree of contexts
that provide essentially copy-on-write semantics on objects; this would allow
one to do exploratory computations and then unwind any object changes.
OO meets AI?

(The actual idea is to provide the appearance of copy-on-write in a hopefully
efficient way.  Using surrogate objects and parent pointers can go a long
way.  The hard part is efficiently dealing with object dispatch in a given
context, I would hazard.)

This idea is kind of nebuluous and there are issues in how one would determine
how to remember (or define) the "result" of the computation so it too is
not unwound.

It seems to me that a multi-user system would introduce many of the same
access control mechanisms that contexts would.  (E.g. the green user can
only modify the green objects.  The question becomes what happens when the
green user tries not modify a red object.  Do we create a substitute green
object?  Do we throw an exception?  Can the user catch the exception, substitute
his own object, and restart the computation?)

Food for thought.

Alexis Layton
alex@XAIT.Xerox.COM