github at esdiscuss.org (2013-07-12T02:26:55.529Z)
Le 20/04/2013 15:17, Brendan Eich a ?crit :
> 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:
>
> ```js
> 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.
I find pretty interesting cases where high-level expressive syntax
results in optimizations that were impossible to very hard without the
syntax.
Is it already implemented in SpiderMonkey? If not, is there a bug number
to follow the progress?
Thanks,
David
Le 20/04/2013 15:17, Brendan Eich a écrit : > 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. I find pretty interesting cases where high-level expressive syntax results in optimizations that were impossible to very hard without the syntax. Is it already implemented in SpiderMonkey? If not, is there a bug number to follow the progress? Thanks, David