Promise.cast and Promise.resolve

Brendan Eich brendan at
Tue Jan 28 22:20:06 PST 2014

On Jan 28, 2014, at 10:14 PM, Kevin Smith <zenparsing at> wrote:

>>> 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 "future-irritant".  
> 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

Preaching to the choir. Andreas R. and I were talking about this after today's meeting. So why isn't chain in the spec?

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the es-discuss mailing list