Re: Future feedback

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