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

Re: A Challenge Problem for Promise Designers (was: Re: Futures)

From: Juan Ignacio Dopazo <dopazo.juan@gmail.com>
Date: Fri, 26 Apr 2013 10:43:46 -0300
Message-ID: <CA+ejddWOSMEOzXHOeyo3qqardZ-PMxjLoThuHqvOvGPzz+46TA@mail.gmail.com>
To: Kevin Smith <zenparsing@gmail.com>
Cc: "public-script-coord@w3.org" <public-script-coord@w3.org>, es-discuss <es-discuss@mozilla.org>
2013/4/26 Kevin Smith <zenparsing@gmail.com>

> What exactly is the controversy here?
>
> I think we all agree with the semantics of "then" as specified in
> Promises/A+.  (If not, then we have a really big problem!)
>

Promise/A+ does not prohibit promises for promises. But in practice the
problem is recognizing what is a promise. There are two options:

1) Recognize all thenables as promises
2) Recognize only the promises from your own library

Many implementations go with (1), including ODMFuture. Since it doesn't
distinguish between promises and thenables, then() flattens all of them.

Juan
Received on Friday, 26 April 2013 13:44:33 UTC

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