On Sep 15, 2014, at 1:26 PM, Aria Stewart <[email protected]> wrote:
> On Sep 15, 2014, at 10:09 AM, // ravi <[email protected]> wrote:
>> On Sep 15, 2014, at 1:01 PM, Alex Kocharin <[email protected]> wrote:
>>>
>>> Promises just wrap callbacks. So you had callback hell, now you have
>>> wrapped callback hell. Nice change, huh.
>>
>> Actually yes, I think it is. Readable code is worth it, in my view.
>
> <snip happens>
> Promise.all returns a promise that gives all the values of the promises you
> pass in. And remember a value without .then can be substituted for a promise
> -- so you now have an interface that can interpret "later values" and
> "already available" values identically. That's where the real power comes in:
> Promises that join and collect results of promises, functions that accept
> promises (or plain values) and give a promise result.
>
I am not unaware of these advantages, but the OP was speaking specifically of
callback hell with an example that indicated the issue is the familiar one of
readable (and manageable) code flow.
--ravi
--
Job board: http://jobs.nodejs.org/
New group rules:
https://gist.github.com/othiym23/9886289#file-moderation-policy-md
Old group rules:
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 unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/nodejs/33F9FA43-A178-485B-87F6-C7F6CD275C0E%40g8o.net.
For more options, visit https://groups.google.com/d/optout.