Futures

Alex Russell slightlyoff at google.com
Sat Apr 27 01:59:11 PDT 2013


On Friday, April 26, 2013, Tab Atkins Jr. wrote:

> On Fri, Apr 26, 2013 at 12:24 PM, Alex Russell <slightlyoff at google.com<javascript:;>>
> wrote:
> > On Apr 26, 2013 8:33 PM, "Tab Atkins Jr." <jackalmage at gmail.com<javascript:;>>
> wrote:
> >> On Fri, Apr 26, 2013 at 11:25 AM, Kevin Smith <zenparsing at gmail.com<javascript:;>
> >
> >> wrote:
> >> > Actually, I may have gotten it terribly wrong (apologies).  In my
> >> > prototype
> >> > implementation, the following:
> >> >
> >> >     Future.accept(Future.resolve(1)).then(value => {
> >> >
> >> >         console.log(value !== 1);
> >> >         return Future.accept(Future.resolve(1));
> >> >
> >> >     }).then(value => {
> >> >
> >> >         console.log(value === 1);
> >> >     });
> >> >
> >> > logs
> >> >
> >> > - true
> >> > - true
> >> >
> >> > Is that what it should be doing, according to the DOM spec?  Anne,
> Alex?
> >>
> >> No, it should be "true", then "false".
> >>
> >> Future.resolve(1) returns a Future<1>.
> >>
> >> Future.accept(Future.resolve(1)) returns Future<Future<1>>.
> >
> > This would all be easier to discuss if you weren't writing using invented
> > methods.
>
> I'm using the methods defined in the Futures spec, because we're
> talking about the behavior of Futures.
>


Ugg...sorry. I wasn't aware the API had grown this much since I last looked
at it. If there is consensus about the new methods, so be it.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20130427/792ce91a/attachment.html>


More information about the es-discuss mailing list