A Challenge Problem for Promise Designers (was: Re: Futures)

Tom Van Cutsem tomvc.be at gmail.com
Wed May 22 03:05:54 PDT 2013


2013/5/21 Andreas Rossberg <rossberg at google.com>

> What's your definition of "entirely transparent" then? Or in other
> words, what if I use 'promise' outside a when?
>

I clarified this with Andreas in person, but FTR: "entirely transparent" is
indeed the wrong word to describe E promises.

For context, E has two message passing operators, obj.m() indicates an
immediate call (as in JS), obj<-m() indicates an eventual send, aka
asynchronous message send, which returns a promise (this is the obj ! m()
syntax proposed in <
http://wiki.ecmascript.org/doku.php?id=strawman:concurrency>).

Outside of "when"-blocks, promises are only transparent w.r.t. "<-", not
w.r.t. "."

IOW: obj.m() will fail if obj is a promise, while obj<-m() will work
"transparently", regardless of whether obj is a promise or non-promise.

I hope this clarifies things.

Cheers,
Tom
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20130522/252c2ca7/attachment.html>


More information about the es-discuss mailing list