Mark S. Miller (2013-06-16T14:25:02.000Z)
github at esdiscuss.org (2013-07-12T02:27:37.447Z)
Hi Bruno, yes the idea is to use the infix ! for async calls, but not in quite the way you mean. Have you seen http://wiki.ecmascript.org/doku.php?id=strawman:concurrency and http://research.google.com/pubs/pub40673.html? The basic idea is that without syntactic support, today in Q to send an asynchronous message, you'd say Q(p).send('foo', a,b) In what has been codified of DOM promises, you'd say Promises.accept(p).then(o => o.foo(a,b)) which wouldn't even work distributed, since there is no local o on which to do a local ".". Both of these are so much heavier than p.foo(a,b) as to make asynchronous and distributed programming remain second class compared to local synchronous programming. So the full proposal is that p ! foo(a,b) would mean to eventually send the message on the right to the receiver designated on the left. Likewise for p ! (a,b) // asynchronous function call p ! foo // asynchronous get p ! foo = x // asynchronous put delete p ! foo // asynchronous delete and the computed forms of all these p ! [name] (a,b) p ! [name] p ! [name] = x delete p [name] [Over a RESTful transport](http://waterken.sourceforge.net/web_send/), these would turn into POST, GET, PUT, and DELETE. Fortunately or unfortunately, because of CORS and UMP (something they agreed on), I expect RESTful PUT and DELETE to wither away and die in browser-to-server traffic. Our recent electronic rights paper uses only POST and GET, even though it uses only server-to-server traffic. If it can't practically be used browser-to-server, I expect it won't be used much server-to-server. Nevertheless, we should keep these forms of "!" in the language.