Promises in E (was Re: A Challenge Problem for Promise Designers)

Let me take a crack at describing E's support for promises.

E has two modes for sending a message to an object. There is the 
immediate send and the eventual send. If the Object is an 
unresolved promise the immediate send will trap. (A promise can 
be forced to resolve using the "when" construct.)

If the program uses eventual sends, then unresolved promises act 
like any other value. This allows operations such as:

Object A on machine 1
Object B on machine 2

A sends to B getting back object C also hosted on machine 2
A sends to C getting back a final result.

The way this is implemented is that when A sends to B, a promise 
for the result C is constructed. When A sends to C, that promise 
is used for the send and a promise for the final result is 
constructed. The message to C is sent without waiting for the 
response from the message to B, eliminating one round trip 
communication delay.

If A needs to use the final result in an immediate operation, it 
will wait for the final result promise to be resolved using the 
"when" construct.

Cheers - Bill

-----------------------------------------------------------------------
Bill Frantz        | I like the farmers' market   | Periwinkle
(408)356-8506      | because I can get fruits and | 16345 
Englewood Ave
www.pwpconsult.com | vegetables without stickers. | Los Gatos, 
CA 95032

Received on Saturday, 27 April 2013 17:52:52 UTC