JavaScript Callback Hell

Discussions center on 'callback hell' in JavaScript/Node.js asynchronous programming, debating whether it's still relevant, a result of poor code structure, or solved by promises and async/await.

📉 Falling 0.3x Programming Languages
2,086
Comments
19
Years Active
5
Top Authors
#389
Topic ID

Activity Over Time

2007
1
2008
1
2009
18
2010
51
2011
165
2012
243
2013
319
2014
216
2015
152
2016
193
2017
205
2018
86
2019
75
2020
78
2021
80
2022
47
2023
78
2024
44
2025
34

Keywords

e.g JS tamejs.org CPS node.js HttpConnection GOTO FWIW CoffeeScript BUT callback callbacks promises async hell async await await js code node

Sample Comments

vosper Nov 11, 2020 View on HN

Yeah, callbacks are fine until you get a big stack of them (so-called “callback hell”). Promises were the touted solution to callback hell, async/await the touted solution to endless promises chaining. While async/await is (tasty) syntactic sugar for promises, I think it’s a real improvement over callbacks - it’s one less argument to every function (because of promises) and I think it’s easier to read: there tends to be less nesting.

hippich Jun 2, 2016 View on HN

"callback hell" is just a sign that you did not split your code into small functional chunks, nothing more. promises/async/await might have its place, but "callback hell" is developer's fault, who can't shake off linear coding past, not language's.

nkristoffersen Feb 21, 2023 View on HN

isn't "callback hell" a bit old fashioned now? With promises and async/await etc.

dimgl Apr 16, 2022 View on HN

Who actually thinks like this?Callbacks were absolutely unmaintainable. Promises (and `async/await`) are really not that hard.

falafel Jan 7, 2018 View on HN

Callback hell? What is this 2010? Callback hell is a non-issue in modern JS code with promises, and async/await.

sergimansilla Apr 19, 2012 View on HN

Well put. It still puzzles me that promises and/or CPS don't have a greater adoption in the JavaScript community. I guess that what happens is that the concept of a callback is a very easy to understand one, but a system becomes more complicated and cumbersome (exponentially, I would say) with every new callback that is added to it. The real problem comes when creating big async applications in JavaScript based entirely in callbacks, as it is the norm now specially in NodeJS projects. Using call

htk Nov 21, 2023 View on HN

That's like callback hell in JS.

mkoryak May 1, 2014 View on HN

do the words "callback hell" mean anything to you?

TickleSteve Jul 21, 2018 View on HN

...This way lies callback hell.

forgottenacc57 May 24, 2017 View on HN

The JavaScript callback hell thing is pretty much solved now isn't it?