Erik Stel
05/22/2026, 6:50 AM.then(...) or Promise.all(...) being used consistently without a final await. Do you know of any research backing this observation? If so, please leave a message (synchronous or asynchronous 😉) pointing me in the right direction. Thx!Tom Larkworthy
05/22/2026, 7:16 AM.then blocks for relatively trivial yet serially dependent tasks like fetch(...) a.k.a. callback hell So even though only one promise is open is open at a time and there is 0 concurrency going on, a then makes this trivial and common task messy by introducing a callback and therefore nesting.
Article 11 years ago before we had await.
https://stackoverflow.com/questions/25098066/what-is-callback-hell-and-how-and-why-does-rx-solve-it
You phrasing makes me thing you think developer who are not fanning out async with Promise.all() are doing it wrong. And if there task has real potential concurrency you would kinda be right, but because Javascript is single threaded you can still have the situation await leads to flatter code and there is no potential fanout to put a Promise.all
So "callback hell" in the context of "promises" is the research that led to await. If you want direct evidence people use await next to an async function you could probably pick an open source project and measure it, I also believe it is probably very common.Андрей Бурлаков
05/22/2026, 7:22 AMTom Larkworthy
05/22/2026, 7:33 AMАндрей Бурлаков
05/22/2026, 7:49 AMTom Larkworthy
05/22/2026, 7:55 AMErik Stel
05/22/2026, 9:55 AMАндрей Бурлаков
05/22/2026, 11:25 AMErik Stel
05/22/2026, 1:47 PMTom Larkworthy
05/22/2026, 1:58 PM.then(...)
ok, well .then is virtually considered legacy in JS at this point. Its only really used in a synchronous function to throw off a side-effect that is unrelated to the return. That means you can avoid marking the function as async.
async/await has replaced most uses of the Promise objects. Promise.all is still needed and used, because thats where you can get parallelism and therefore speedups. I am not sure they actually merged it but the main linter for JS has at least agreed stylistically await is preferred to then (https://github.com/eslint/eslint/issues/9649)dman-os
05/22/2026, 11:09 PMselect! (Promise.race) or join! (Promise.all). Usually, those are points of cross task/thread communication and scheduling or timeouts, with a lot of code falling into an event loop style as such.
So roughly (bear with me, I don't know PL nomenclature), async must appear like "bloat" that shows up everywhere only to be exercised at these pinch points. At least on the macro syntax level. But! As Tom points out, cooperative multitasking using futures/async-await/delimited continuations (all in service of having stackless coroutines) is such a win that a lot of trains have tacked on that car. For the rust case, if you're familiar with the lang, check out this discussion https://without.boats/blog/let-futures-be-futures/
Note that rust is not JS, it's not forced into a single threaded runtime and yet mountains were moved to implement this feature.
And think about cooperative multitasking/concurrency conceptually. The CPU gives us one temporal line to follow. One way or another, you'll have to pay the toll to hack around this weather it's stackfull/stackless coroutines or preemptive green threads. The syntax being the major "cost" in the stackless case.Tom Larkworthy
05/24/2026, 11:16 AMdman-os
05/24/2026, 12:39 PM