Hacker News new | ask | show | jobs
by pcwalton 1243 days ago
Async/await in Rust is mostly just sugar on top of futures, which you can implement manually. There's plenty of old code in Rust that predates async/await that does just that.
1 comments

Sure and Python's yield is just sugar around the generator protocol, but both bits of plumbing are quite a bit more sophisticated than "just another function parameter." I know I'm being a bit pedantic, but I think "function colors" ought to mean something a bit more than "a commonly used function parameter."
The phenomenon of “coloured functions” is usually derided because of the way it infects the call tree. In this sense context proliferation is the same phenomenon. Otherwise no one would really care about coloured functions.
Fair enough