4 ms·
> C++ has been gradually back-porting Rust features, I would hardly say that move semantics, or reusing temporary objects instead of deep copying them, is some
by rewmie 3y ago
> C++ has been gradually back-porting Rust features,
I would hardly say that move semantics, or reusing temporary objects instead of deep copying them, is something invented by Rust.
Also, move semantics were introduced in C++ with C++11, which was in the works since the early 2000s. Rust first appeared in 2015. Are you actually trying to claim that C++ in 2011 specified in an international standard features that it back ported from a language that only saw the light of day in 2015?
> To make forward progress with the C++ model, you have to throw stuff out of the language.
No, not really. Mindlessly removing features only breaks backward compatibility with no reason. We have progress by offering improvements. It's up to the developer to manage how he manages their projects. Mindlessly breaking compatibility prevents that same developer from benefitting from improvements for no reason whatsoever.
> Many, many people, including me, have tried to make C/C++ safer without breaking backwards compatibility too much. It doesn't seem to be possible to do both. You have to disallow some things or the exercise is pointless.
This is an absurdly silly thing to say. It's a kin to complaining that making Rust safe is pointless because Rust still supports unsafe.
- Animats 3y agoThe safety problems of C/C++ come from the old features, such as null-terminated strings, arrays without size information, and pointer arithmetic. Until there is a will to kill those off, there will not be much forward progress in safety.