> One the one hand it's a great article that hits the nail on the head why using async/await in JS (and other languages) is very painful
> Rust's async/await even though - you might have guessed it - it doesn't apply!
So the author starts off by declaring that the colored functions problem only applies to other languages but not to rust.
Soon after, he takes exception with the claim "You can only call a red function from within another red function".
His primary argument in support of this is that in rust you can execute an async function blockingly in an executor. And to do vice versa, i.e. call a sync function in an async loop, that you can either block the event loop or hand it off to a different machinery.
The fact is, both of these things can be done in other async runtimes as well. For eg. it's a near identical scenario in python async. Like others have pointed out in this comment thread, this is true in Scala too. Perhaps the author is unaware of this?
So yes, rust does indeed have the colored function dichotomy, as any async runtime would, the author's angry assertions to the contrary notwithstanding. (I say this as a fan of both rust as well as async runtimes, which I feel are a nice fit for certain use cases.)