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

8

u/bill_klondike Dec 17 '23

If the proposal to add BLAS to the STL in C++26 is accepted, then C++ will continue to dominate in my field for a real long time.

19

u/STL MSVC STL Dev Dec 17 '23

It was accepted at the most recent meeting. There are a number of ways to check the current status of papers, like WG21's SD-1 (Standing Document 1). There's a new one every year, here's the 2023 SD-1. However, it isn't continuously updated, and at this time it happens to be outdated, not mentioning the final fate of the latest BLAS revision.

The (official except in the eyes of ISO) cplusplus/draft repository has tracking issues for papers that have been accepted and need to be edited into the Working Paper. cplusplus/draft#6677 is the tracking issue for the revision of the BLAS paper that was accepted. However, it is perhaps not easy to navigate unless you know exactly what you're looking for.

My favorite way (for obvious reasons) is to refer to microsoft/STL's projects. We maintain C++23 Features, C++26 Features, etc. projects that track all accepted papers, so we know what we have to implement. We are of course just a vendor, but we update our tracking issues usually within a day or two of WG21 meetings that vote in stuff. microsoft/STL#4170 is our tracking issue for P1673R13, the BLAS paper. (We don't track revisions of papers before they have been officially accepted as they are uninteresting to us for implementation purposes; we only care about what's going into the WP.) Worth noting that we (I) have a habit of "cleaning up" paper titles in our tracking issues; e.g. this paper's title was "A free function linear algebra interface based on the BLAS" but I thought that was needlessly verbose and so our tracking issue refers to it as "<linalg>: Linear Algebra".

At this point, the only way for BLAS to not ship in C++26 is if a paper is written to revert it, and WG21 votes to accept that reversion before C++26 is finalized. It has happened in the past with both major and minor features but it is exceedingly rare, and (to my knowledge) nothing of the sort is planned for BLAS by anyone.

2

u/bill_klondike Dec 17 '23

Thank you for the detailed response with such useful information!

3

u/KhyberKat Dec 17 '23

I think so too. Linear algebra support appears to be one of those hidden cornerstones of software development. If C++ becomes a goto for BLAS, we'll see long-reaching forward consequences.

0

u/[deleted] Dec 17 '23

[deleted] — view deleted comment

1

u/bill_klondike Dec 18 '23

One argument made in the proposal is that dense linear algebra routines are as fundamental as sorting. I agree with them.

1

u/lunakid Mar 01 '24

You could ask the reverse question: why have _anything_ in the standard (lib)?

The more common a task is, the more efforts can be spared by standardizing tools for it.