[E-Lang] unbreakably fulfilled promises
Marc Stiegler
marcs@skyhunter.com
Mon, 26 Mar 2001 17:09:16 -0700
During a code review for a system that uses ELib, I discovered that a poor
mental model of the promise architecture had propagated to the development
team, to the detriment of the development effort. This email is being sent
in an attempt to catch up with the poor mental model, wherever it may
reside, and correct it.
In the early days of E, mark miller had a broken mental model of his own
promise architecture (or at least it was less useful than later mental
models :-) He thought of promises as things which could be fulfilled but
then, even though they had been fulfilled, they could later be broken. This
is unlike promise fulfillment in day-to-day life.
This much is true: a single variable that started out as a promise may be
fulfilled, and that variable may later be broken. It is inappropriately
confusing to think of the fulfilled promise being broken, however.
A better way to think about what is happening with promises is this: once a
promise is fulfilled, the promise can never be broken. However, if the
promise is fulfilled with a live reference, that live reference may itself
later be broken (when the connection is dropped). If the promise is
fulfilled with a local object, breaking just can't occur thereafter.
I am hopeful that E in a Walnut explains this understandably enough so that
people who learn the promise architecture from the book will come out with a
good mental model (though feedback on success/failure on this is, of course,
encouraged :-)
--marcs