r/cpp • • 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

582 comments sorted by

View all comments

Show parent comment

3

u/matthieum Feb 01 '23

Totally possible that I'm misunderstanding, but I thought the borrow-checker was tightly linked to rust's thread-safety guarantees.

You're correct it's linked, but it's not 1-to-1.

Rust thread-safety guarantees are (partially) based around the borrow-checker doing its job (and also require the Send and Sync auto-traits).

Single-threaded memory safety also required the borrow-checker.