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

Re: Future feedback

From: David Bruant <bruant.d@gmail.com>
Date: Fri, 10 May 2013 20:02:43 +0100
Message-ID: <518D4453.3080404@gmail.com>
To: Sean Hogan <shogun70@westnet.com.au>
CC: public-script-coord@w3.org
Hi Sean,

Answering to the part I have an answer to.

Le 08/05/2013 02:27, Sean Hogan a écrit :
> 3. The `catch` method throws an "Unexpected identifier" error in older 
> browsers, including IE6-IE8.
['catch'] is the answer for the time older browser matters (which 
depends on people's requirements) [1]

> I saw one library provided `fail` as an alternative to `catch`.
This been discussed early [2]. I prefer "fail" too, but don't care that 
much as long as there is something.

> 6. I can't work out why a Future wouldn't provide (read-only) access 
> to `state` and `result`. If they were present in the API I can't 
> imagine anyone asking for them to be removed.
For context, see [3].

> 7. The `done` method definitions seem to have a couple of typos.
> In one place it returns `void`, in another it returns a new Future. I 
> believe it is supposed to return the context Future so that `done` can 
> be chained.
The purpose of done is to avoid a to chain so that uncaught errors 
aren't propagated without being caught. When you call .done and the last 
promise had an error, the devtools can tell you so (telling you before 
.done could be confusing as the error might be later caught)

David

[1] https://www.w3.org/Bugs/Public/show_bug.cgi?id=21424
[2] https://github.com/slightlyoff/DOMFuture/issues/18
[3] https://github.com/slightlyoff/DOMFuture/issues/34
Received on Friday, 10 May 2013 19:28:31 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:37:49 UTC