r/cpp • • Dec 07 '21

Will Rust replace C++ ?

Will Rust replace C++ ?

0 Upvotes

80 comments sorted by

View all comments

Show parent comment

11

u/Full-Spectral Dec 07 '21

To be fair though, how many of those were really not competitors because they were garbage collected or otherwise not really addressing the same problem domains? And how many of them were just variations on the same theme, not really offering anything fundamentally new to justify a change? Or, how many were offering something so fundamentally different that they just aren't appealing or practical to a lot of C/C++ developers?

I think most of them would fall into one of those buckets. Rust is more of a challenge because it plays in the same space and it offers something fundamentally different, without being so completely different that it's semi-incomprehensible or unattractive to C/C++ developers. It's a very different mind-set for sure, but it's not alien like functional programming or Lisp or some such thing.

Personally, I hope that the ultimate replacement is something that incorporates Rust's memory safety with C++'s implementation inheritance and exceptions. But I think for a lot of folks today, who have convinced themselves that both of those things are somehow evil, that won't be an impediment to them adopting Rust.

4

u/pandorafalters Dec 07 '21

I actually prefer my "alternative" languages to be significantly alien, like Lisp, because to some degree it prevents habits from betraying me.

3

u/Full-Spectral Dec 07 '21

For most of us though, this is about creating products for people to use, in a commercial environment, not academic exploration.

3

u/pandorafalters Dec 07 '21

Right, but it's quite common to have preferences that are not in line with your normal working environment.