Hacker News new | ask | show | jobs
by praeclarum 5468 days ago
Why?

"You should donate all your money to praeclarum." "Why?" "Because I said so."

2 comments

I think the tone of the title is ambiguous. After reading the article, I felt it was more of

"[Here's an example of] Avoiding Nested Callbacks"

instead of

"Avoiding Nested Callbacks [is important and something you should do]"

Please elaborate on your question.
My reading of the title followed the first commenter.

For years we've been begging for locally bound function declarations so we don't have to explicitly pass variables to callbacks and so we don't pollute the global namespace with worker function names.

This article then proceeds to throw all that away so we can have named functions. Worse, you can have names and locality that he ignores:

    function bigGuy() {
        function littleWorker() { /* stuff */ }
        begin(littleWorker);
    }
So my question, why do this? What are the benefits?