Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Nowadays whenever I see a callback waterfall forming, my first thought is https://npmjs.org/package/node-async.


Yep there's plenty of solutions to callback hell.

My particular favourite is the Lamina library in clojure which takes the event-driven approach https://github.com/ztellman/lamina/wiki/Introduction


You should take a look at C#'s 'async' and 'await' keywords, which keep code asynchronous code looking sequential:

http://msdn.microsoft.com/en-us/library/vstudio/hh156513.asp...


OP is in a pretty unique form of callback hell. a list, a function, and a for loop would suffice.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: