3 ms·
Another key thing is that in many languages, you can (and will often enough in practice for it to be a concern) do I/O outside of an async function, using the e
by pxeger1 2y ago
Another key thing is that in many languages, you can (and will often enough in practice for it to be a concern) do I/O outside of an async function, using the equivalent blocking API. So in those languages, async does not act as a useful “this function is expensive/impure” marker.
- colejohnson66 2y agoThat's because many languages start without async/await. So, sync overloads stay for eternity for backwards compatibility. If I could design a language from scratch, I'd argue for async/await OOTB. For example, the Microsoft Midori team did "async everything" in their C# derivative.[0] [0]: https://joeduffyblog.com/2015/11/19/asynchronous-everything/ https://joeduffyblog.com/2015/11/19/asynchronous-everything/