3 ms·
This argument is pointless because we have different definitions of automatic. Can we at least agree that Rust’s model prevents the following errors that manua
by brokencode 4y ago
This argument is pointless because we have different definitions of automatic.
Can we at least agree that Rust’s model prevents the following errors that manual memory management is prone to?
- Using an object that has already been freed.
- Failing to free an object that can no longer be accessed.
To me, preventing those problems is the main benefit of automatic memory management. C++ will happily let you make either one of these mistakes, and that’s how Rust is different.
I agree that Rust imposes a cost in the code to accomplish this compared to garbage collection. It’s up to the individual programmer to decide whether they think it is worth the benefits.