3 ms·
I think a few things are simultaneously true here: 1. async/await is a huge improvement over callbacks. 2. doing asynchronous programming through callbacks ha
by overgard 5mo ago
I think a few things are simultaneously true here:
1. async/await is a huge improvement over callbacks.
2. doing asynchronous programming through callbacks has always been a messy hack, primarily coming from languages that couldn't/wouldn't do real concurrency in their runtimes and async/await just papers over it without fixing the fundamental problems
3. threads are a lot more elegant from a language design standpoint and a lot more powerful, but..
4. .. I would much rather fuss with what color my function needs to be than deal with the average concurrency bug that results from threads.
- gpderetta 5mo agodefinitely point 1. Also: 5. Async/await is a necessarily evil that allows for extremely high concurrency (10s of millions of concurrent tasks) where stackful coroutines and threads wouldn't practically scale.