On Thu, May 23, 2013 at 3:29 AM, Baz <[email protected]> wrote:

> I am new to Node and trying to decide between promises, asynch and
> vanilla, there are so many good arguments for each. Mikeal, do you mind
> expanding further how using promises in your own, non-shared, code could
> hinder use of node? Do a lot of the libs that depend on asynch require you
> to use asynch as well (or make things easier if you do)?
>

I think the problem with promises is that the core node libraries aren't
implemented with promises, so if you need to do a series of e.g. fs calls
(typical example might be open, then stat, then create a readStream from
the fd) you wind up using async anyway, or manually coding up the nested
callbacks, which can feel ugly once you've started using a particular flow
control library. And then once you start using async for one thing, it just
starts to feel natural. It just fits so perfectly with the Node ecosystem.

In short: There's nothing wrong with the promises model (although I find it
overly verbose), it's just that async fits better with node libraries.

Matt.

-- 
-- 
Job Board: http://jobs.nodejs.org/
Posting guidelines: 
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups "nodejs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en

--- 
You received this message because you are subscribed to the Google Groups 
"nodejs" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to