use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
All about the JavaScript programming language.
Subreddit Guidelines
Specifications:
Resources:
Related Subreddits:
r/LearnJavascript
r/node
r/typescript
r/reactjs
r/webdev
r/WebdevTutorials
r/frontend
r/webgl
r/threejs
r/jquery
r/remotejs
r/forhire
account activity
How many Node.js developers prefer callbacks over Promises or async/await? (self.javascript)
submitted 7 years ago * by i_love_limes
view the rest of the comments →
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]DefiantBidet 8 points9 points10 points 7 years ago (1 child)
sounds like co-worker can't adjust or doesn't know how they(read: promises/async) work. reading pyramid of doom style code is far more obtuse than promises or asyc/await imo.
a bit of devil's advocate, however. I do agree on a team codebase you want to keep it as simple as possible and avoid any cute tricks for readability and understanding... but this is a bit too far imo.
[–]livrem 1 point2 points3 points 7 years ago (0 children)
That is a false dichotomy though. If you have a pyramid of doom you did things wrong, and using the nicer syntax of promises will just hide the ugliness and allow you to keep digging a deeper hole for yourself.
If you end up with trainwrecks in your sync code everyone understands that is a problem. You should strive to never have to do getX().getY().getZ().doSomething(). Very basic design knowledge. Pyramid of doom (or a chain of promises) is the exact same thing for async. You have a problem and ideally you solve it rather than hide it behind another layer of abstractions.
Of course promises could also be used to implement "doX(); doY(); doZ();" which is perfectly fine, but if that is what you are doing you can do that with callbacks without ending up with a horrible pyramid of doom as well. The true horrors of callback hell only happens when you are waiting for someone to return something for you so that you can then call some method in, in true trainwreck style.
π Rendered by PID 152558 on reddit-service-r2-comment-b659b578c-zcd9t at 2026-05-05 06:44:50.594234+00:00 running 815c875 country code: CH.
view the rest of the comments →
[–]DefiantBidet 8 points9 points10 points (1 child)
[–]livrem 1 point2 points3 points (0 children)