4 ms·
I will openly say I think Rust is an all-around better language. If you are building general-purpose systems software, or just want to write fast software, use
by gavinray 4y ago
I will openly say I think Rust is an all-around better language. If you are building general-purpose systems software, or just want to write fast software, use Rust.
If you are fiddling with bits, doing low-level concurrency, writing a GC/Memory Manager etc, or have self-referential datastructures like graphs or trees, you're going to have an order of magnitude easier time writing it in C++. (Rust-experts excepted)
Also, the developer experience writing C++ is worse than Rust by miles. Though the tooling (fuzzing, LSP, debugging, sanitizers, etc) is stellar, likewise with Rust.
- rich_sasha 4y agoI agree with this, but also sadly note structures like trees are sadly quite common, in the type of code I write anyway. It is a bit of a niggle I have with Rust.
- worik 4y ago> sadly note structures like trees are sadly quite common, in the type of code I write anyway. It is a bit of a niggle I have with Rust. Trees are no problem with Rust It is circular, rather than recursive, data structures that are troublesome
- rich_sasha 4y agoI had to use recursion to build a tree in AoC '22 day 7. I needed to have both a mutable stack of current tree nodes (`cwd` if you like) and the tree structure. Or equivalently a doubly-linked tree, where nodes point at their parent. It was a bit ugly. In C++ you just write it. I get why it's hard in Rust, just saying, it really does crop up.
- worik 4y agoYes. It is hard on garbage collection too, circular structures.
- pjmlp 4y agoTry the Rust development experience in Visual Studio or Clion versus C++, specially for stuff like GUI, DirectX or parallel debugging.
- gavinray 4y agoCLion is quite good you're right. I think it's the best of any Jetbrains IDE Visual Studio is also impressive, though I have a bit of bias against it from when it was so slow. (I know it's not the case now. It has a great debugging experience, that I don't think can be rivalled anywhere else.)