Comment

Comment by zipfle

I know I'm in the minority about this, but I still prefer callbacks. In one common case, you're only doing one or two async things in a given area of the code, and in that case the async primitive you choose doesn't really matter. In another common case, you're doing a lot of async things that depend on each other's outcomes. In that case, I find that it's easier to build a reusable pattern for handling the specific type of async interaction you have using callback-based functions, whereas with promises and async/await, you tend to try to write straight line code that can't be reused and hides the asynchrony in a way that makes it difficult to debug.
parent zipfle 9 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton