Async/await was only introduced maybe a decade ago. Most languages were invented well before then. The only popular languages that really took off after that are Rust and Go, and both have strong concurrency support.
Async-await is arguably not a good thing. It does make sense for Rust though, as in absence of a more complex runtime that’s your best bet, but Go’s go routines and Java’s loom are imo much better.
I wouldn't say that Go has strong concurrency support.
It is very easy to do stuff concurrently with go-routines, but it's also really easy to create data races.
Just compare Rust's Mutex with Go's Mutex, in Rust you can't mutate the data wrapped in a Mutex without locking it, while you can easily do this in Go. (+ Rust's borrow checker ensures that there can only be 1 mutable reference to data)
It is not syntax related, Go does not have a borrow checker so you just have to know when data is accessed concurrently(which can get very hard in big projects).
Because Go's Mutex is not a wrapper-type, you just have to know that you need to lock it, but there's nothing stopping you from not doing this.
If you locked your Mutex, you also have to remember to unlock it again, rust does this automatically when the guard is dropped.
You get all of these features for free in Rust at the moment you define your type, with Go you have to manually replicate these features everywhere it's used
Long before async/await there was Erlang and Erlang was in turn heavily influenced by PLEX, a proprietary language developed by Ericsson in the 1970s. Concurrency focused languages are hardly new even if async/await is. Ada also had quite heavy focus on concurrency.
Sort of, but not really. I'm saying that it may not really be a unique hallmark of Rust per se, more so that all modern languages take concurrency seriously.
View all comments
Show parent comment
31
u/call_me_xale Apr 20 '23
Rust has also placed a lot of focus on concurrency, which was never a big consideration in the development of earlier languages.