News for hackers. Stuff that matters.
Re:Managing Node.js Callback Hell with Promises, Generators ... by tlrobinson on Tuesday February 04, 2014 @05:46PM (#7180775)
The "promises" way of writing that concisely would be:

    read_files(dir).then(get_stats).then(find_largest).then(callback, errback)
Any exceptions in those functions would propagated to the "errback". Not perfect but much better than the examples in the article would suggest.

There are no comments on this comment yet.