4 ms·
If you’re a safe c++ programmer who never writes code that has memory errors, you need to be tracking ownership and lifetimes. Once you get your head around th
by imron 4y ago
If you’re a safe c++ programmer who never writes code that has memory errors, you need to be tracking ownership and lifetimes.
Once you get your head around the borrow checker, Rust takes a lot of that cognitive load off you, by tracking things for you at compile time and dinging you on it if you get something wrong.
- ReflectedImage 4y agoRust imposes a lot more constraints than just what is needed to make it safe. It imposes constraints to make it provably safe according to Rust's internal theorem prover. I'm not convinced Rust & C++ have as much in common as you think. Rust is really familar to OCaml or Haskell users.
- kaba0 4y agoRust is literally C++’s RAII made into a compiler-checked concept.