W3C home > Mailing lists > Public > public-script-coord@w3.org > April to June 2013

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

From: Domenic Denicola <domenic@domenicdenicola.com>
Date: Thu, 2 May 2013 22:39:37 +0000
To: Jonas Sicking <jonas@sicking.cc>, "Mark S. Miller" <erights@google.com>
CC: Tab Atkins Jr. <jackalmage@gmail.com>, "public-script-coord@w3.org" <public-script-coord@w3.org>
Message-ID: <B4AE8F4E86E26C47AC407D49872F6F9F7EF71D0B@SN2PRD0510MB360.namprd05.prod.outlook.com>
From: Jonas Sicking [jonas@sicking.cc]

> (... 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

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:37:49 UTC