Does anyone know what the final state of Rust’s async will look like? It seems like everyone is dreading it now but will it ever get to a point that people like writing it?
async is final unfortunately. My experience with rust so far is that there is a small set of program structures which Rusts type system works well for, and a large set of programs and structures where it becomes an unholy mess to make work e.g. deep lifetime magic, complex async/traits scope, etc.
If you stick on the golden path then the compiler has your back, deviate, and then you are stuck in a deep hell of compiler suggestions that don't pan out. One observation I've had is that complex lifetime problems are usually solved by copy's or the use of unsafe in most production code. I would love to see a future equivalent of "clean code" for Rust, as the current situation is reminiscent of early java programming.
The problem is that async code doesn't interact properly with the rest of the rust language. You can't make async traits, async iterators or streams, or use async closures. The problem isn't async. Its that the rest of the language is apparently (still!) incompatible with async code.
All of this stuff is "coming" - and by that I mean, there have been RFCs kicking around since 2017 aiming to fix these problems. Blergh.
In my experience I quite enjoyed async Rust, there was definitely quite a bit of yak shaving required to get tokio and various other async/sync libraries to play nicely together, but once that was done I haven't run into any significant issues with it. Are there problems with it I'm unaware of or is the somewhat fractured async ecosystem still a too high barrier to entry?
I agree. It's not like there aren't plenty of improvements to be made, but I write a lot of async Rust and the limitations (which are well enumerated elsewhere in the comments) just aren't really an issue for what I do.