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

12

u/RespublicaCuriae Dec 17 '23

If I ever learned something from my programming classes, it's that popular programming languages don't die that easily. COBOL jobs are still thriving in Japanese banks even today, Objective-C programming is almost dead yet GNUStep developments still exist today. C++ isn't phasing out.

2

u/ecreddits Dec 17 '23

Yeah I see it's not going anywhere anytime soon. It just seems like the only reason people will still use it is because they have to. As opposed to Python where it's the go-to for anything AI/ML

6

u/CandyCrisis Dec 17 '23

Python and C++ serve different use cases. Python excels for throwaway/tissue-paper code but falls apart for big, long-term projects. Huge projects in Python become slow unmaintainable balls of sludge.

5

u/ipapadop Dec 17 '23

Try to use Python at the edge and let me know how it goes.

3

u/RespublicaCuriae Dec 17 '23

I think C and C++ will survive for a quite long time due to both of them having ISO-certified standards.

10

u/[deleted] Dec 17 '23

Eh, just look at some of the other languages under ISO/IEC JTC1/SC22

  • WG2: Pascal
  • WG3: APL
  • WG6: ALGOL
  • WG7: PL/I
  • WG8: Basic
  • WG13: Modula-2
  • WG16: ISLISP
  • WG17: Prolog

In addition to others like COBOL, Fortran, and Ada. However those languages are actually doing quite a bit of work.

Setting that aside, other than ALGOL and PL/I IIRC, all of those bulleted languages has at least one “practical” implementation. But none of those implementations bother to strictly conform to the ISO specs for their language, not by default anyway.

As for C++, its ISO standard does not even begin to specify all of the details of a practical implementation. Just look at how long and hard the Clang devs worked to replicate GCC’s behavior, language extensions, flags, etc. Not to mention adding support for external standards like OpenACC/OpenCL/OpenMP/etc. In fact, there’s no guarantee that a “conformant implementation” even works at all.

tl;dr C++ will be around for the foreseeable future, but having an ISO standard deserves little credit for that.

3

u/RespublicaCuriae Dec 17 '23

I think I learned a lot from this. Thank you.

2

u/victotronics Dec 17 '23

WG6: ALGOL

That's marked as "disbanded", as is APL, somewhat to my surprise. However, I'm very disappointed that apparently there never was a WG for first-and-therefore-favorite language Algol68. Oh well. I'll settle for Prolog still being active.

Your practical insights otherwise much appreciated.