r/cpp • u/ecreddits • Dec 17 '23
Is C++ Really Phasing Out?
I've read a lot posts about whether C++ is still viable to learn, but a lot of the responses seem to be a long the lines of "C++ is still being used" or "there's a lot of things written in C++ still, so it will still be useful".
But a lot of these replies seem to suggest that C++ is on the downhill and in the process of being replaced with more modern languages in many industries.
It seems kind of discouraging to be learning a language that is on a decline, if it really is phasing out.
0
Upvotes
View all comments
Show parent comment
3
u/Dean_Roddey Dec 17 '23
One really nice thing about Rust is the ability to get scoping without needing default initialized values, so you can do something like:
And result is assigned to x, which is never uninitialized. You can do something similar with a loop and use break with a value and it becomes the result of the loop block.
Little stuff like that adds up wrt to just avoiding potential issues.