A Design Space Exploration of Async/Await

32 points by drmorr


Forty-Bot

previously

snej

Swift wasn’t listed in the eager/lazy dimension; IIRC it’s eager. I think I prefer eager, since laziness adds a lot of overhead to every async call, which is bad if a function frequently doesn’t need to await anything (e.g. it memoizes some async computation.) In JS this is quite noticeable, with calls to async functions being many times slower. There may be less overhead in Rust since futures are typically stack-allocated.

Speaking of Swift, it supports both definite and indefinite extent, also known as structured vs unstructured concurrency. And Rust supports a limited form of definite extent in the form of ‘async{}’ blocks.

It occurs to me that C++ should have been included; maybe it wasn’t because coroutines are still sort of bleeding-edge. Were it included, results would vary with different coroutine implementations, just as with Rust.