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

Re: Futures

From: Kevin Smith <zenparsing@gmail.com>
Date: Mon, 22 Apr 2013 13:53:53 -0400
Message-ID: <CA+mDt2yrgBQ5JJNvZCQuEiJVMpRixKiP+oDaNUmUQwaUNUgYug@mail.gmail.com>
To: Dean Landolt <dean@deanlandolt.com>
Cc: Domenic Denicola <domenic@domenicdenicola.com>, Brendan Eich <brendan@mozilla.com>, "Mark S. Miller" <erights@google.com>, Douglas Crockford <douglas@crockford.com>, "public-script-coord@w3.org" <public-script-coord@w3.org>, Norbert Lindenberg <w3@norbertlindenberg.com>, Markus Lanthaler <markus.lanthaler@gmx.net>, es-discuss <es-discuss@mozilla.org>
> I would love to see this, but best I can tell it can't be a straitforward
> polyfill. The necessary infrastructure has to settle, and what are
> Promises/A+ implementers supposed to do in the meantime?
>

Presumably the standard version of Future would provide some convenient way
to get the symbol.  The library would use that to conditionally provide the
symbol-named alias.  Something along these lines:

    if (typeof Future !== "undefined")
        MyPromise.prototype[Future.thenSymbol] = MyPromise.prototype.then;

No?

{ Kevin }
Received on Monday, 22 April 2013 17:54:20 UTC

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