Where'd Promise#done go?

David Bruant bruant.d at gmail.com
Thu Jun 20 14:35:28 PDT 2013


Le 20/06/2013 18:08, Mark Miller a écrit :
>
>
>
> On Thu, Jun 20, 2013 at 7:50 AM, David Bruant <bruant.d at gmail.com 
> <mailto:bruant.d at gmail.com>> wrote:
>
>     Le 20/06/2013 14:55, Forbes Lindesay a écrit :
>>
>>     I’ve been answering quite a few questions about promises on stack
>>     overflow lately.
>>
>     Do you have a link to a list to these questions (and/or your
>     answers) off-top your browser history by any chance?
>
>
>>     One of the key things people seem to struggle to get their head
>>     around is the idea of `.then` as being something that transforms
>>     the promise and returns a new promise.  They either expect it to
>>     mutate the existing promise or they expect it to behave like
>>     `.done()` does.
>>
>     I wasn't there when that started, but it feels like "then"
>     organically grew out of the experience of using promises a lot
>     which naturally leads to promise pipelining.
>
>
> I'm worried that you may be suffering from and spreading a terminology 
> confusion. "Promise pipelining" is an important latency reduction 
> optimization when using promises over a network. See Chapter 16 of 
> <http://erights.org/talks/thesis/markm-thesis.pdf>. Using .then, 
> either with or without the return result, **/prevents/** promise 
> pipelining, which is another reason to emphasize asynchronous message 
> sending and deemphasize .then.
>
> From context, I suspect you're talking about "promise chaining".
Yes, I meant "chaining". Sorry for the confusion.

David
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20130620/216c4d3a/attachment.html>


More information about the es-discuss mailing list