Every time I see another poll about the @rustlang async/await syntax, I feel like it's missing the option "I just want async/await to be stable and will defer to the Rust Core team's best judgment about the syntax"
-
Show this thread
-
mik Retweeted mik
I don't currently do any Rust programming, but thread FWIW: https://twitter.com/mik235/status/1129246179835883520 … (async/await is a mistake)
mik added,
2 replies 0 retweets 2 likes -
Promises/async/await seem like a total hack necessary for JavaScript only. Why would languages that don’t need (Rust, C++) it adopt it? What am I missing? It’s miserable in JS, too.
4 replies 0 retweets 5 likes -
Because it’s the fastest of all available options. Coroutines needs stacks and are therefore slower.
4 replies 0 retweets 6 likes -
I don’t see how that necessarily follows, but I’ll believe you
1 reply 0 retweets 1 like -
It’s mostly all about malloc perf. Async/await avoids allocations (alliteration!) BTW, the syscall cost of spawning a thread on Linux is a lot less than the cost of allocating the stack.
3 replies 0 retweets 9 likes -
Put another way, basically in the Rust community "requires malloc" is synonymous with "DOA" unless the use of malloc is a temporary hack that people plan to eventually remove. Also legacy; async/await has a clear migration path from futures which is what people currently use.
3 replies 0 retweets 0 likes -
Replying to @BRIAN_____ @pcwalton and
I have the opposite view: async/await is a form of psychic torture and should be illegal
1 reply 0 retweets 0 likes
I agree with both of you :) The way I see async/await: Some folks with extreme perf needs are going to write async code (even if some of them shouldn’t). Might as well give them tools to make it nice as opposed to saying “have fun with combinators”.
-
-
Yeah, and I guess my rant about Javascript doesn't apply to rust, since javascript is all non-blocking. The real trick is avoiding doing blocking/high CPU stuff in your async/coroutine/whatever runtime.
2 replies 0 retweets 0 likes -
Yep, that’s a hazard, and that’s one reason why I like threads :)
0 replies 0 retweets 1 like
End of conversation
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.