Hacker News new | ask | show | jobs
by jayflux 1658 days ago
> Why has Rust struggled so much with this, where Go has succeeded from the start with its language-level “goroutine” concept and runtime?

It’s not that Rust has struggled, it was never Rust’s priority to have a runtime or high level async code. It had very different goals to Go.

It’s like asking “why has C struggled to implement Promises like JavaScript”? The languages serve different purposes.

You’re right it wasn’t their initial focal point but later on Rust wanted to offer the chance of having a go-like runtime without destabilising the low-level performance at the core level. I.E only those that use it pay for it and those that don’t use it aren’t affected.

Offering “zero cost” futures etc is very difficult to do.

See https://aturon.github.io/blog/2016/08/11/futures/ for more info, old but still relevant (including the chart)