-14
you are viewing a single comment's thread
view the rest of the comments
[-] soulsource@discuss.tchncs.de 4 points 9 months ago

There is also the y-combinator thread that discusses async as implemented in Rust compared to using Monads to represent async computations: https://news.ycombinator.com/item?id=17536441

The arguments that withoutboats presented in that thread convinced me that Rust's async is the better of these alternatives for a language like Rust.

Another thing that helped to convince me of that is that I tried playing around with Free Monads and the Writer and State Monad in Rust, and found them to be very un-ergonomic. Rust is very explicit about heap allocations, and when using basically any Monad that's more complex than Option/Result I found myself typing Rc::new() way more often than I would have liked... If you add do-notation to the mix, things get even more verbose (aka: annoying): https://github.com/bodil/higher/issues/6

So, yeah. Rust async isn't perfect, but it's probably better to have it than not.

this post was submitted on 23 Jan 2024
-14 points (23.1% liked)

Rust

5966 readers
19 users here now

Welcome to the Rust community! This is a place to discuss about the Rust programming language.

Wormhole

!performance@programming.dev

Credits

  • The icon is a modified version of the official rust logo (changing the colors to a gradient and black background)

founded 1 year ago
MODERATORS