News for hackers. Stuff that matters.
Re:Node.js - A giant step backwards? by chc on Wednesday January 25, 2012 @03:10PM (#3511491)
There's already a branch of CoffeeScript, called Iced CoffeeScript (http://maxtaco.github.com/coffee-script/), that does this. The example in the post would look like:

  for blogPostId in recentBlogPostIds
    await asynchronousDB.getBlogPostById blogPostId, defer(err, post)
    templating.render post
Though you still can't simply return the result — you'd have to use a continuation — but it does make it simple enough to use CPS in general.

There are no comments on this comment yet.