Ah what a great little tutorial. Thanks for sharing that one.
It looks like rust async creates state machines similar to how Kotlin does it with so-called Continuations.
It looks like rust async creates state machines similar to how Kotlin does it with so-called Continuations.
The continuation model is the standard model of async programming and still perhaps the nicest semantically. Rust's big innovation is that futures are polled from the top, i.e. (potentially) advanced in an idempotent way whenever any of their relevant resources progresses, which is nicer for resource-conscious programming because it doesn't require that you capture the stack. It adds complexity over the continuation model from the programmer's point of view, but opens up async programming to a wider range of contexts in a way that is genuinely novel.