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

Re: Futures

From: Juan Ignacio Dopazo <dopazo.juan@gmail.com>
Date: Wed, 24 Apr 2013 10:01:02 -0300
Message-ID: <CA+ejddUZjihPCqMJBGc1_An9PEq58M16rSu-YC0sko_9SJK6ow@mail.gmail.com>
To: Ron Buckton <rbuckton@chronicles.org>
Cc: "public-script-coord@w3.org" <public-script-coord@w3.org>, es-discuss <es-discuss@mozilla.org>
2013/4/23 Ron Buckton <rbuckton@chronicles.org>

> I fall mostly under the "native futures should not implicitly chain
> library futures" camp. Its easy enough to write:
> var p = // some thenable
> return new Future(resolver => p.then(resolver.resolve, resolver.reject);

That looks terrible inefficient, so in our implementation we tried to make
chaining easier by returning a new promise from then() based on
promise.constructor. And once in the wild the issues started appearing like
someone trying to implement a LazyPromise and having issues chaining
then(). So we're considering reverting to returning a simple promise before
it becomes technical debt.

Received on Wednesday, 24 April 2013 17:03:53 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 17:14:12 UTC