←back to thread

Async/Await is finally back in Zig

(charlesfonseca.substack.com)
39 points barddoo | 1 comments | | HN request time: 0.207s | source
Show context
dilawar ◴[] No.45782574[source]
Someone has historical insights into why async/await seems to have taken over the world?

I often write Rust and I don't find it very attractive, but so many good projects seem to advertise it as a "killer feature". Diesel.rs doesn't have async, and they claim that perf improvement may not be worth it (https://users.rust-lang.org/t/why-use-diesel-when-its-not-as...).

For a single threaded JS program, async makes a lot of sense. I can't imagine any alternative pattern to get concurrency so cleanly.

replies(8): >>45782621 #>>45782683 #>>45782771 #>>45782778 #>>45782809 #>>45782885 #>>45782984 #>>45784113 #
1. felipellrocha ◴[] No.45782885[source]
Being fully multithreaded comes with significant overhead, while browsers essentially proved how much unreasonable performance you can get out of a single cpu using async because of javascript’s async model.

It is hard to describe just how much more can be done on a single thread with just async.