> > Resolving this would be much appreciated. Gecko recently turned on > Promises in our nightly builds, and already branched to our aurora > builds. I believe Chrome is in a similar situation.
Chrome has "shipped" Promises, i.e. they are enabled by default on the current stable Chrome. So the situation is more serious for us. > - Promise.cast is renamed to Promise.resolve (remove old Promise.resolve) > - Keep then, reject chain (NOT DEFER, reject!) > - Renaming .cast thus removes over-wrapping (always-wrap) deoptimization > in old Promise.resolve Sorry for knowing little about ES "consensus", is this the final decision? Will you change it again? Thanks, On Wed, Feb 5, 2014 at 1:53 AM, Jonas Sicking <jo...@sicking.cc> wrote: > On Wed, Jan 29, 2014 at 7:33 AM, Kevin Smith <zenpars...@gmail.com> wrote: > >> > >> It is, actually, more simplicity. The concept of `Promise.resolve` and > >> `Promise.chain` is simpler than `Promise.cast` and `Promise.then` (i.e.: > >> they represent orthogonal concepts, not "complected"). `Promise.cast` > and > >> `Promise.then` may be, arguably, *easier* to work with, from a user POV, > >> since you don't need to make as many choices. I would argue that it > would > >> make more sense to write `cast` and `then` in terms of `resolve` and > >> `chain`, however. But this seems to have already been decided. > > > > > > It does make more sense, and from my point of view it's not decided. > What > > is decided is the AP2 design. That is: > > > > 1) promises are fully parametric and, > > 2) `then` recursively unwraps the *input* to its callbacks. > > > > For the sake of coherency (aka conceptual integrity), `then` needs to be > > written in terms of `chain`. This issue needs to be resolved ASAP, > however, > > since promises are making their way into engines now. > > Resolving this would be much appreciated. Gecko recently turned on > Promises in our nightly builds, and already branched to our aurora > builds. I believe Chrome is in a similar situation. > > / Jonas > _______________________________________________ > es-discuss mailing list > es-discuss@mozilla.org > https://mail.mozilla.org/listinfo/es-discuss >
_______________________________________________ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss