natively negotiating sync vs. async...without callbacks

Mark S. Miller erights at
Tue Dec 7 15:39:39 PST 2010


Hi Kyle, you may also be interested in taking a look at the strawman at <> and the Orleans
paper and video just announced in the email below. One lesson to take from
these (and similar systems going back to Actors) is: once you support
asynchronous interactions between objects well, you are already most of the
way towards supporting distributed object computing. Since JavaScript in
practice (Browsers with postMessage and WebWorkers, async xhr, NodeJS) is
already de-facto using communicating event loop concurrency, this seems like
a natural step. We're already using the abstractions on that strawman page
via the ref_send libraries, but without the syntactic support proposed by
that strawman.

The kind of local chaining you're talking about can be expressed
straightforwardly using Q.when, though a bit verbosely because of the
"function" and "return" keywords. If we had a shorter function syntax, e.g.,
"#" for "function" and "(expression)" for "{ return expression; }", then we
could code your example as

    const xP = X(1,2);
    const yP = Q.when(xP, #(x) (Y(3,4)));
    const zP = Q.when(yP, #(y) (Z("foo")));

This still seems much more verbose, but it accomplishes something else that
you typically want: it brings the resolution of each expression into scope
(x, y) for use within the body of the next one.

---------- Forwarded message ----------
From: Ravi Pandya <ravi at>
Date: Fri, Dec 3, 2010 at 6:35 AM
Subject: [e-lang] Orleans framework for cloud computing
To: e-lang at

I've been working on a project in Microsoft Research that builds on some
ideas from E and related work - promises, turn-based execution,
object-capability patterns, etc. It is a framework and runtime for writing
distributed applications to run in the cloud (and eventually on the client
as well). It also includes functionality such as optimistic lightweight
transactions, transparent persistence, and object replication &
synchronization. We're not yet ready to release the code externally, but we
have published a technical report and an online video describing the
project. I'd be interested in your comments.

Tech report:




e-lang mailing list
e-lang at
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the es-discuss mailing list