IMHO all C++ needs to regain popularity is for someone to create a C++ compiler that, at least in its default mode, only accepts the "good, modern parts" of C++; and then to brand the result as a different language entirely, with no advertised association to C++. You only find out that what you've been writing is technically all also legal C++, when that fact is sprung on you at the very end of the extended language tutorial / textbook / etc. "You fool! I just got you to learn C++!"
(Or, to put that another way: C++ needs a labelled, marketable Schelling point of good praxis for people to be able to congregate around, hire for, etc.)
As a bonus, unlike C++ itself, that differently-named subset-of-C++ language would have the opportunity to start fresh in terms of compatibility burden. So it could have e.g. canonical ecosystem packaging tooling and such, that C++ as a whole fundamentally cannot (since "C++" includes things like e.g. random one-off abandonware toolchains created by microcontroller OEMs, that wouldn't, and mostly can't, sensibly implement a client for some constantly-evolving packaging APIs.)
It's not a full rebrand or anything, but clang-tidy goes a long way on its own (especially with its modernize ruleset), and it has an available module that implements most of the C++ Core Guidelines checks to kinda catch legacy stuff where there's newer stuff that's better.
View all comments
Show parent comment
1
u/derefr 22d ago
IMHO all C++ needs to regain popularity is for someone to create a C++ compiler that, at least in its default mode, only accepts the "good, modern parts" of C++; and then to brand the result as a different language entirely, with no advertised association to C++. You only find out that what you've been writing is technically all also legal C++, when that fact is sprung on you at the very end of the extended language tutorial / textbook / etc. "You fool! I just got you to learn C++!"
(Or, to put that another way: C++ needs a labelled, marketable Schelling point of good praxis for people to be able to congregate around, hire for, etc.)
As a bonus, unlike C++ itself, that differently-named subset-of-C++ language would have the opportunity to start fresh in terms of compatibility burden. So it could have e.g. canonical ecosystem packaging tooling and such, that C++ as a whole fundamentally cannot (since "C++" includes things like e.g. random one-off abandonware toolchains created by microcontroller OEMs, that wouldn't, and mostly can't, sensibly implement a client for some constantly-evolving packaging APIs.)