RE: Promises: Auto-assimilating thenables returned by .then() callbacks: yay/nay?

From: Jonas Sicking []

> (... lots of really good stuff ...)

I agree with everything you wrote, both in the technical content and in the tone. I appreciate the tone as a counterpoint to the two extreme voices we've heard from so far, and in particular it's great you've given some perspective on the WebApps WG process which I don't think many people in this discussion have. It's also really good that you phrased things as "noodling over the Future API" instead of "we produced a spec, you didn't, so STFU".

The issue of whether a way to create promises for promises is an important one, and I fear that if DOMFuture continues to allow it, speculative-TC39-promises will be forced to include recursive implicit thenable assimilation in order to prevent such entities, which have made it into the wild of the web via DOMFutures, from infecting the program. But that aside, the issue of whether to assimilate thenables implicitly or explicitly can be considered separately from DOMFuture's promises-for-promises abilities.

And as for your summary of the original question in this thread, of whether thenable assimilation should be done by the promise implementation: it's a good summary. I do want to add one more thing: thenable assimilation only works if `then` is a function, so it's less dangerous than `__proto__` in that sense. May be small consolation to some, but seems important. Otherwise I will not repeat arguments that have happened elsewhere.

Received on Thursday, 2 May 2013 22:40:09 UTC