&gt; Do you want C++ compiler to also prevent data races? Then use const functions by default, seriously.<p>Tell me how to use const functions to enforce that I take a lock before accessing data guarded by a mutex. Or how to mutate data local to the current thread only, while forbidding mutation of shared data.<p>&gt; Imagine if all the effort of 8 years of Rust team went into a modern C++ safety library.<p>I imagine our 8 years would have been wasted chasing the impossible.