> > > 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.
_______________________________________________ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss