Remix.run Logo
swiftcoder 5 hours ago

> But are we really saying that the primary motivation for async/await is performance?

The original motivation for not using OS threads was indeed performance. Async/await is mostly syntax sugar to fix some of the ergonomic problems of writing continuation-based code (Rust more or less skipped the intermediate "callback hell" with futures that Javascript/Python et al suffered through).

PunchyHamster 3 hours ago | parent [-]

In some languages, yes, in others (js/python) async is just workaround about not having proper threading.

swiftcoder 2 hours ago | parent [-]

Python used multiple threads to handle I/O long before async/await was a glimmer in anyone's mind (despite the GIL). nodejs is one of the very few languages I can think of that was born single-threaded and used an asynchronous runtime from the get-go