4 ms·
> Callback hell is a gift that forces you to > refactor code until it's easy to understand That doesn't sound like a gift to me. Unless you meant they are
by always_good 10y ago
> Callback hell is a gift that forces you to
> refactor code until it's easy to understand
That doesn't sound like a gift to me. Unless you meant they are so painful as an abstraction that they gifted us with promises and then async/await.
Almost everyone here has worked with callbacks and you'll be hard-pressed to find people that felt like they improved the code base.
Just tiny changes to the logic, like an if-statement with branching async behavior, would cause disproportionally large changes in the callback structure, pretty much touching every line/indentation.
The rest of your post is really negative and judgmental. Not sure why you felt it was necessary.
- erikpukinskis 10y agoOh, sorry... in editing I forgot the bit about where promises fit in the framework/app paradigm. Added a paragraph.
- z3t4 10y agorefactoring is better then an extra if and argument. and force you to understand the code and result in less bugs.