3 ms·
Callback hell is easily avoided by naming callbacks. Async/await has its own footguns, except they’re so difficult to debug that you need static analysis tools
by erikpukinskis 7y ago
Callback hell is easily avoided by naming callbacks.
Async/await has its own footguns, except they’re so difficult to debug that you need static analysis tools (Typescript or ESLint) to use them safely.
It’s one of that most special class of APIs that let you add a bug in one part of the system (e.g. forgetting an await) that causes a totally different part of the system to fail inscrutably. (Although really it’s Promises that unlock this ability, but potato/potahto.)
Callbacks are easily debugged with just a normal JavaScript interpreter.