5 ms·
I can't say I ever understood how and why async became such a big feature for Rust. I feel like I might understand someday (when I have more experience working
by TwentyPosts 3y ago
I can't say I ever understood how and why async became such a big feature for Rust. I feel like I might understand someday (when I have more experience working with async code) but for now it kind of feels like adding it to the language was a massive, severe change which severely shaped the development and future of the language for years (async traits are still a work in progress!) and I just don't understand whether async was truly the right approach here, or the one feature to prioritize above all else.
As far as I know the community is (was?) still a bit divided on async, mainly because it's rough around the edges, and makes for bad compiler errors.
I wouldn't be surprised if 15+ years later people will think of async as "Probably great for its time, but there are better concurrency paradigms which we should shift to." similar to the shift from inheritance to composition.
- anacrolix 3y agoI wonder if it was a mistake: it'll be really hard to undo something like async because it infects the code. Which itself should have been a warning sign.
- gavinhoward 3y agoYou put into words a lot of the feeling I have about Rust.
- dmytrish 3y agoAsync might be a wrong abstraction for high-level programming: green threads/goroutines are so much easier to use. On the other hand, writing a state machine for handling concurrent events/transitions is literally async done manually. libuv, any high-performance network server, UI events handling are all like that. I agree that doing low-level async right is difficult and might be an impractically long process.