2 ms·
Really? Since about c++14, the number of memory errors I've experienced in practice is asymptomatically trending towards 0. When they do come up, it's usually i
by maccard 3y ago
Really? Since about c++14, the number of memory errors I've experienced in practice is asymptomatically trending towards 0. When they do come up, it's usually in some awkward C library that has been badly wrapped, and would likely necessitate unsafe in rust anyway. I genuinely can't remember the last time I introduced a memory stomp, use after free, double delete or slicing issue in a modern c++ Codebase.
- PoignardAzur 3y ago(Replying a bit late) It's not about memory safety, exactly. It's hard to convey the difference in how I experienced coding in Rust vs in C++/JS/Python/etc. The big thing is that the absence of shared mutability means you can be very confident that when you "have" a reference to a thing, you "own" it, and it's not going to change value under you. When a bug came up in a C++ codebase I often felt like it could come from anywhere. In Rust the suspect list was much shorter, which made for a more tranquil debug experience. (I'm told this is also the experience of people writing Haskell, but I've never managed to read any Haskell code, so Rust it is for me.)