Re: Concerns about DOMRequest

On Wed, Feb 13, 2013 at 8:27 PM, Marcos Caceres <w3c@marcosc.com> wrote:
> It would still really suck if you added .then() but still required everything to be wrapped in a function.

What do you mean by this?


>> A promise object in the Web Platform seems to be something that
>> everybody wants but it is not clear that having it added in the DOM is
>> the best way to do it.
>> Having a Future object in Javascript would very
>> likely be better and last I've heard, Alex's plans were to push for
>> DOMFuture and for a Future object in Javascript.
>
>  Alex?... Anne? … Bueller?

The plan is to have at least a subset in JavaScript. That would also
allow some more meaningful interfaces (e.g. Future<Blob>). I don't
think it really matters much where we define this though, we just need
to agree on the specifics and move on.


> We shouldn't continue to propagate this design from one API when we have others that do
> async stuff better (e.g., XHR, even Geolocation's callbacks).

I think Future gives a much better API for both of those. Future is
great for any kind of async yes/no API.


-- 
http://annevankesteren.nl/

Received on Thursday, 14 February 2013 11:17:38 UTC