Promise.cast and Promise.resolve
zenparsing at gmail.com
Tue Jan 28 22:14:10 PST 2014
> This seems like something that can be deferred to ES7.
> Which "this"? .chain is deferred to ES7, and in V8 experimentally.
Deferring `chain` is, if not future-hostile to `chain`, then
The way Promises are currently spec'd, the return value of the `then`
callback is itself recursively unwrapped using `then`, rather than the more
appropriate single-unwrapping of `chain`. Single unwrapping of the output
side is consistent with the AP2 design principal that the provider does not
determine the unwrapping policy.
You cannot consistently implement AP2 without `chain` from the get-go. It
is the primitive unwrapping function which `then` should be calling.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the es-discuss