brendan at mozilla.com
Tue Apr 23 22:38:16 PDT 2013
Tab Atkins Jr. wrote:
> I still think that burdening the
> call-site with the need to pull a future out of the object like that
> (even though, yes, the object itself will be optimized out by future
> VMs) is too much.
This started (for me) when you 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
But now that I've pointed out JS has multiple return values, you're not
Don't worry about VMs, it's not important to fret about their poor lot
in life. Premature optimization is root of evil and all that. If this
case (or the Proxy.revocable one) became important enough for functions
to look into their continuation and optimize away their returned object,
VM'll do that.
Having to name the properties is good, it makes the API self-describing.
More information about the es-discuss