←back to thread

452 points birdculture | 1 comments | | HN request time: 0.371s | source
Show context
Havoc ◴[] No.43979116[source]
I thought it was quite manageable at beginner level…though I haven’t dived into async which I gather is a whole different level of pain
replies(1): >>43979133 #
echelon ◴[] No.43979133[source]
Async and the "function color" "problem" fall away if your entire app is in an async runtime.

Almost 90% of the Rust I write these days is async. I avoid non-async / blocking libraries where possible.

I think this whole issue is overblown.

replies(6): >>43979257 #>>43979273 #>>43979433 #>>43979524 #>>43981881 #>>43986031 #
bigstrat2003 ◴[] No.43979433[source]
"Just write everything async" is not remotely a good solution to the problem. Not everything needs to be async (in fact most things don't), and it's much harder to reason about async code. The issue is very much not overblown.
replies(1): >>43979650 #
Salgat ◴[] No.43979650[source]
Why is async code harder to reason about? I've been using it in C# and the entire point is that it lets you write callbacks in a way that appears nearly identical to synchronous code. If you dive into concurrency (which is a separate thing but can be utilized with async code, such as joining multiple futures at the same time), that parts hard whether you're doing it with async or with explicit threads.
replies(3): >>43980094 #>>43980325 #>>43982797 #
1. guappa ◴[] No.43982797[source]
Because 1 mistake somewhere will make your whole application stuck and then you must locate which call is blocking.