by h0l0gr4ph1c · 5y ago · 0 comments
The problem I see is the current async story is opt-out. It's use async or go find something else. Async should be opt in. As in, the code works regardless of an async runtime, async is added magic if you want it, but it will run like normal single threaded code if not.
That sums this discussion up nicely.
Surely this is only the case if you have picked asynchronous libraries to use?
However, I think what the parent is getting at is the feeling of the total package, not the technical details. If every library you want to use is async, you can't really "opt out" exactly, even if technically the feature is opt out.
Couldn't you have made another hard constraint to make async code work as normal if the programmer wanted?
If aysnc could work like regular blocking code , if we want, and async code when you want, I think rust would be in a better place.
Just because you can do something doesn't mean you should.