W3C home > Mailing lists > Public > public-script-coord@w3.org > April to June 2013

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

From: Tom Van Cutsem <tomvc.be@gmail.com>
Date: Wed, 22 May 2013 12:05:54 +0200
Message-ID: <CAKDfNj9QhaUm3cJGmmzUL8-PJ2Ppygh3Lbx-9H1BuvwhVPNWpg@mail.gmail.com>
To: Andreas Rossberg <rossberg@google.com>
Cc: David Bruant <bruant.d@gmail.com>, "Mark S. Miller" <erights@google.com>, "public-script-coord@w3.org" <public-script-coord@w3.org>, Mark Miller <erights@gmail.com>, Dean Tribble <tribble@e-dean.com>, es-discuss <es-discuss@mozilla.org>
2013/5/21 Andreas Rossberg <rossberg@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
Received on Wednesday, 22 May 2013 10:06:22 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:37:49 UTC