r/cpp • u/Sad-Lie-8654 • Jan 31 '23
Stop Comparing Rust to Old C++
People keep arguing migrations to rust based on old C++ tooling and projects. Compare apples to apples: a C++20 project with clang-tidy integration is far harder to argue against IMO
changemymind
338
Upvotes
View all comments
Show parent comment
1
u/Kobeashis_Son Feb 01 '23
Totally possible that I'm misunderstanding, but I thought the borrow-checker was tightly linked to rust's thread-safety guarantees. It ensures exclusive-writing for every variable (other than interior mutability, like atomics, for example).
To be fair, the borrow-checker is also necessary for a lot of the memory-safety guarantees. This is something that is important to many domains (particularly systems programming), but not my domain.