Re: Futures

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.

Juan

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