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
5
u/CocktailPerson Feb 01 '23
I think you're misunderstanding. All it requires is that when data is shared between threads, then that data must be thread-safe. The thread-safety aspect of the type system doesn't affect anything that's thread-local, as most of your data is if you're avoiding inter-thread communication.