I have yet to see an "improvement" on callbacks, whether it's promises or fibers or generators, where the benefit in readability is worth the havoc it wreaks on my ability to debug the program.<p>These days I write JavaScript using only functions, literals, variables, and the occasional prototype and it's amazing.<p>I think many programmers have a desire to believe they are working on complex problems that demand sophisticated tools. I remember learning Ruby and being excited whenever I found a reason to write a DSL. In retrospect it was unnecessary every time. In every case the code would've been clearer if I had just stuck with functions and kept refactoring until I had the right interfaces and data structures.<p>It helps to remember<p><pre><code> function a() {
b(function() {
//etc
})
}
</code></pre>
is equivalent to<p><pre><code> function a() {
b(c)
}
function c() {
//etc
}
</code></pre>
which is not particularly more verbose. And as a side benefit, refactoring that way gives you an opportunity to make c() self-documenting.