zlacker

[return to "The bane of my existence: Supporting both async and sync code in Rust"]
1. gavinh+tc[view] [source] 2024-01-19 23:06:42
>>lukast+(OP)
I hope that someday, we can have a Rust-like language without async.

Bonus points if it has the ability for users to define static analysis a la borrow checking.

◧◩
2. andrew+Hd[view] [source] 2024-01-19 23:13:54
>>gavinh+tc
Async programming is beautiful. It’s the easiest and most natural way to do multiple things at the same time in single threaded code.

Async makes things possible that are hard or impossible to do with synch programming.

It’s a real game changer for python especially. Cant comment on rust, hopefully its implementation is smooth.

◧◩◪
3. nsm+mf[view] [source] 2024-01-19 23:23:20
>>andrew+Hd
Async/await is a _concurrency_ mechanism, and concurrency is certainly naturally useful. However async/await is certainly not the best implementation of concurrency, except in the narrow design space Rust has chosen. If you have a language with a runtime, green threads/fibers/coroutines, along with a choice mechanism is really the way to go. It trades off some performance for much better ergonomics. Go, Java, Racket all use this. It is unfortunate that Python picked async/await.
[go to top]