| ▲ | aero-glide2 4 hours ago | |||||||
Quite impressive, I did not know so many bugs were due to memory access. | ||||||||
| ▲ | IshKebab 2 hours ago | parent [-] | |||||||
To be fair the increased reliability of Rust code over C++ isn't just because of memory errors (out-of-bounds accesses, use-after-free, type confusion, etc). You also get: * No undefined behaviour (outside `unsafe`, which is quite easy to avoid). In C++ there are many many sources of UB that aren't really memory errors directly, e.g. signed integer overflow or forgetting to `return` from a function. * A much stronger type system. Those two things have a really significant impact on reliability. | ||||||||
| ||||||||