Readability of code is very important. Inline callback definitions hurt this.
Readability of code is very important. Inline callback definitions hurt this.
Promises and especially async/await let you read code top to bottom once more, with other benefits like monad chains that catch synchronous failure.
For example, you want to know that the code is about to "getAccountData" but you shouldn't need to know how. You see that it is called, and you see that afterward, a callback called "loadAccountDataInReport" will be called. Why should you see all the guts of those two functions inline?
This is where the "just wrap it" argument breaks down.
Though I think promises are only slightly better when you have if-else branches that add to the async chain. It's not til async/await where Javascript finally hits its stride.