News for hackers. Stuff that matters.
Re:Escape from Callback Hell by coldtea on Sunday March 03, 2013 @05:53AM (#5313319)
>They're just continuations, seriously, what's everyone's problem?

That they're badly made continuations, without support from the language.

>If you feel like your code is nesting too deep, you define the function elsewhere and just reference it by name. Then you don't get access to the current scope.

At the cost of moving stuff out of where it's invoked, so making code harder to read.

The problem with callback hell is that is pushes the programmer to write FOR the machine, in the way the machine likes it. Those things should be an implementation detail, and in good languages, are.

Re:Escape from Callback Hell by ufo on Sunday March 03, 2013 @09:04AM (#5313743)
My favourite example of this is loops. Its very annoying to put an async call inside the loop since you need to rewrite the loop as a recursive function.
Re:Escape from Callback Hell by rbrcurtis on Sunday March 03, 2013 @01:28PM (#5314648)
https://github.com/caolan/async

Once I started using the async library, all of these problems everyone is illustrating basically disappeared.

Re:Escape from Callback Hell by Joeri on Sunday March 03, 2013 @06:25AM (#5313388)
Something lie this? http://taskjs.org/
Re:Escape from Callback Hell by fzzzy on Sunday March 03, 2013 @02:49PM (#5314994)
Unfortunately task.js requires javascript generators which are only implemented in Firefox right now.