Brendan Eich brendan at mozilla.com
Sat Apr 20 06:17:40 PDT 2013

Tab Atkins Jr. wrote:
> It would be so nice if JS had multiple return values, so we could let
> cancellable future-returning APIs just return a naked resolver as
> their second value,

Hello, destructuring:

let{  proxy, revoke}  = Proxy.revocable(target, handler);

from http://wiki.ecmascript.org/doku.php?id=strawman:revokable_proxies. 
Or use an array pattern if you prefer.

JIT'ing VMs can optimize these pretty easily to avoid object allocation.


More information about the es-discuss mailing list