Just for comparative reference, here is a generators implementation (
https://gist.github.com/Raynos/56da201abbb50992ad06 )

I refactored the weird part into a `unique` function.

Things that are worth noting are:

 - how easy `if` statements are with generators
 - you can replace 90% of the `async` module with good usage of `yield` and
`parallel`
 - good interop with existing callback code allows for easy conversion to
generators style.


On Fri, Aug 16, 2013 at 10:53 PM, Andrew Kelley <[email protected]>wrote:

> I wrote this article as a response to all the recent callback hate:
>
> http://andrewkelley.me/post/js-callback-organization.html
>
> It contains:
>
>    - Acknowledgement of better async syntax than what callbacks offer
>    - Tips on how to structure callback based code
>    - Reasons why you might want to stick with js instead of a
>    compile-to-js language.
>
>  --
> --
> 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.
>

-- 
-- 
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