This is a speculative idea for discussion, I realize that it would entail a bunch of work.
A few years back I came up with an idea I called “Swarm”, see here for a detailed description: http://code.google.com/p/swarm-dpl/
Briefly, the idea is to use Scala’s portable continuations (via the delimited continuations compiler plugin that came with Scala 2.8) to build a system that could seamlessly distribute computation across multiple computers in an efficient way. It’s a little like Google’s “Map Reduce” concept, except not limited to algorithms that can be broken down into Map and Reduce operations.
One application for this concept that I didn’t explore in too much depth was the idea of using portable continuations to transfer program flow between a web browser and a web server. The potential would be to make communication between browser and server almost completely transparent to the programmer. Some code would run on the server (that which needs to interact with a database, or that which must be secure), and some would run in the client. The system would automatically determine which is which.
So the main missing component from the language would be some kind of continuations support - probably similar to the delimited continuations plugin in Scala, which operates through a code transformation. How fesable would this be?