Утро после "Оно 2" начнётся с треда Go vs Rust. Там ответ идёт на статью с Медиума(окт 2018), но я озвучу ток пару особенно метких вещей.
"Its interfaces aren’t very expressive" → They are, they use a different model tho, so you have to get used to it. Interfaces in go are meant for users, not for implementers of a functionality.
example: I invite you to try and sort a heap in Rust and Go using the stdlib without re-implementing the sorting part and you'll see why sort.Interface is quite nice. Even sorting two slices becomes complicated if you want to abstract them as one.
"The standard library of Rust is just as rich as that of go" → This is just false. Try creating an html template, a webserver, a URL parser... those are not easy things and it doesn't stop there. About the ecosystem replacing stdlib please see here:
https://research.swtch.com/deps"Thus, the already huge performance gap between Go and Rust" → citation needed. Rust is nice for some benchmarks but when you have to deal with a lot of async I/O and thousands of independent threads of execution you either lose fairness or efficiency.
Rust is "zero cost" in the meaning that it is amazing to not make you pay for what you don't use, but if you use something you pay for it, potentially more than stuff that had tens of years of work on it like the Go runtime.
Conclusion: Rust and Go are good tools and they have different philosophies so they will be good at most things, but *best* at different things. Don't try to make this a dichotomy because it is not. They can coexist and improve software development for everyone.
тред:
https://twitter.com/empijei/status/1169245932602503170статья:
https://medium.com/@george3d6/the-success-of-go-heralds-that-of-rust-73cb2e4c0500