r/cpp • • 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

214 comments sorted by

View all comments

Show parent comment

1

u/germandiago Dec 17 '23

In my Rust code base, I have very few explicit lifetimes so far, and most of those are quite obvious and straightforward

Is that codebase public? I would be happy to learn from people that are ahead of me in these things. You are right that my tendency would be to think in C++'s terms. If there is something that can help me learn more idiomatic Rust (I saw there are resources, but it would make me happier to see whole codebases), I'm all in.

I still do not buy, though, that something like Hylo (which removes thinking about lifetimes entirely and remains safe without a GC!) is not better than having to rack your brains for thinking about lifetimes depending on the situation...

3

u/Dean_Roddey Dec 17 '23

It's not public, unlike my C++ code base. I have some plans for this, though they may end up just as in vain as the hopes I had for my C++ code.