Rust – Compile Time Memory Safety
In this post, I will explain why Rust is interesting by making an analogy between “dynamic vs static typing” and “C++ vs Rust’s static memory validation” without going into too much detail. Since memory safety in C++ is a major practical issue, it would be great if we can validate them at compile time in a similar manner that static typing does. To be fair, there are compiler options or external tools that we can use to detect C++ memory issues, but it’s nowhere close to the completeness of Rust due to the implementation complexity and the inherent language spec limitations.
Source: kkimdev.github.io