3 ms·
To summarize the answer, Go was created as a better replacement for Java and other managed languages. Rust was created as a better replacement for systems progr
by shmerl 7y ago
To summarize the answer, Go was created as a better replacement for Java and other managed languages. Rust was created as a better replacement for systems programming languages (the author brings this point in the conclusion).
This claim however is somewhat misleading: "Rust is a C++, not a C". It's clearly not either of them - it's a new language. However, it's a good replacement for both C and C++. May be the above idea means, that those familiar with C++ concepts can find Rust easier to understand - that's true, it uses major ideas from it like scope based resource management (aka RAII) and so on. But it uses other ideas as well.
No language is perfect in absolute sense, and each has its own trade offs. But the above gives a rough framework to answer "why Go and not Rust" or "why Rust and not Go" in some particular situation.
There is always going to be some overlap area, where both are adequate enough, so any answer to such questions would be moot there.
- kristoff_it 7y agoThis comment on Reddit I think explains why I think there is a big difference between C and C++ and why in my opinion Rust is not the best substitute for the former: https://old.reddit.com/r/programming/comments/d50u9g/why_go_and_not_rust/f0j5na2/ https://old.reddit.com/r/programming/comments/d50u9g/why_go_...
- shmerl 7y agoI agree with the view of "portable assembly", or to say it more correctly, language that allows high level of control. Rust at least aims at that, so it should be a good replacement for C. Some things were still missing though, if I remember correctly something like handling memory allocation errors was an issue, which is important for embedded systems and similar scenarios. I suppose there was some plan to address that.