27 ms·
Can someone experienced in both Rust and Go comment on how the two languages compare regarding concurrency? Is it more flexible having it in stdlib vs being bak
by xkarga00 12y ago
Can someone experienced in both Rust and Go comment on how the two languages compare regarding concurrency? Is it more flexible having it in stdlib vs being baked into the language? I regard myself as fairly experienced in Go and find its concurrent primitives really straightforward to use. The whole goroutines-channels-select package feels like a very powerful and easy to use tool for concurrent code (though you can still shoot yourself in the foot).
- bjz_ 12y agoIt is a great deal more flexible having concurrency constructs built as library features as opposed to baked into the language. If the constructs provided don't make the same performance tradeoffs that your use case demands, you can build your own. These can provide safe, statically verified APIs by leveraging Rust's ownership and lifetime semantics. Unfortunately channel selection and futures are still pretty raw at the moment (it remains to be seen if it will be ready for 1.0), but other constructs such as threads, channels and mutexes are looking pretty strong for 1.0.