Re:C++23: Removing garbage collection support
by kaba0 on Thursday November 02, 2023 @04:14AM
(#38110390)
> but Rust will give you a helpful compile-time error while C++ will let you blow your foot off.
But Rust can actually analyze trivially when this happens, while it is not possible with C++ due to language semantics.
> You also have to be careful not to mess with a moved-from object, as it's in an unspecified state.
This is a great example of Rust being easier, even when it just as complex. Both languages don't allow you to use an object after it is moved, so it is the same amount to learn and to think about when writing code, but Rust will give you a helpful compile-time error while C++ will let you blow your foot off.