News for hackers. Stuff that matters.
Re:Goals and Priorities for C++ by CoolGuySteve on Thursday May 21, 2020 @10:38PM (#23268175)
> 2. Non-goals

> 2.1. Stable language and library ABI

> 2.2. Backwards or forwards compatibility

> 2.3. Legacy compiled libraries without source code or ability to rebuild

For fucks sake, C has been stable for decades but somehow C++ just can't manage?

This is such an obnoxious attitude. At least let us automatically generate a set of C-style functions that take an opaque void* representing a C++ class instance if you can't be bothered to do the work.

Re:Goals and Priorities for C++ by dodobirdlord on Friday May 22, 2020 @12:20AM (#23268592)
> This paper describes the goals and priorities which the authors believe make C++ an especially effective programming language for our use cases. That said, our experience, use cases, and needs are clearly not those of every user. We aren’t pushing to directly build consensus on these points. Rather, this is presented as a vehicle to advertise our needs from C++ as a high-performance systems language.

The authors are (mostly) at Google. They build their binaries from scratch from a monolithic source repo with a reproducible build system every time they want to deploy software. Their use case is unusual and they recognize that. The document lays out their justification for what they prioritize and why, for example, they would happily sacrifice backwards compatibility or nonstandard architecture support for more performance.

Re:Goals and Priorities for C++ by google234123 on Thursday May 21, 2020 @10:49PM (#23268242)
Calm down my friend. Why should C++ be exactly like C? There are reasons that C is a declining language. Also, I don't get why you think they have obnoxious attitude? They do go into detail for each point, I don't think your characterization is fair.
Re:Goals and Priorities for C++ by _bxg1 on Thursday May 21, 2020 @10:54PM (#23268255)
If anything it seems like C++ is the one in decline. C is still the only option for lots of use-cases; C++ is a) succumbing to feature-bloat and b) having different parts of its userbase siphoned off by Go, Rust, Swift, even C# (games; both Unity and Godot).
Re:Goals and Priorities for C++ by pjmlp on Friday May 22, 2020 @02:21AM (#23269176)
The only thing keeping C around are FOSS UNIX clones and embedded developers that are religiously stuck with C89 and their PIC compiler extensions.

Even Arduino like boards use C++ nowadays.

Unity and Godot have their graphics engine written in C++.

Rust, Swift are dependent on LLVM, written in C++.

Go, it isn't really in the same league of programmer expressiveness.

Re:Goals and Priorities for C++ by anpfr on Friday May 22, 2020 @05:07AM (#23270051)
The "only thing" (FOSS UNIX clones) is kind of a gigantic thing.

The Windows kernel is mostly written in C, too. iOS uses Objective C.

Modern C++ isn't bad, but robust classes require an enormous effort together with tests suites that approach the size of test suites required for an untyped Python module.

In practice segfaults are as prevalent in C++ as they are in C. Type errors by implicit conversions are more frequent in C++ than they are in C. Full testing of all conversion rules requires a superhuman effort.

So I think well written C is often safer than well written C++, because one does not have to deal with the case explosions introduced by classes and their implicit rules.

The often quoted safer strings in C++ are just a very tiny part of the equation.

If I had my way, we'd all be writing Ada or Standard ML, but no one listens.

Re:Goals and Priorities for C++ by pjmlp on Friday May 22, 2020 @06:10AM (#23270410)
While they are still gigantic, I bet long term they will stop being so, thanks to the cloud, type 1 hypervisors, unikernels and serverless computing.

30 years ago no one though commercial UNIXes would be wiped out by a "toy" UNIX clone project.

Windows kernel has been moving into C compiled as C++ since Vista introduced support for kernel mode C++.

iOS uses C++ for its drivers, Metal shaders and compiler toolchain. That Objective-C implementation relies on C++.

Yes, the Trojan horse of C's copy-paste compatibility is also its Achilles heel of security, however in contrast with C's attitude regarding security, C++ provides the library types to actually implement secure code, if one bothers to make use of them.

If I had my way, C would have bounds checking enabled by default, strong typed enums, proper arrays and strings, but no one at WG14 listens.

Re:Goals and Priorities for C++ by saagarjha on Friday May 22, 2020 @03:28AM (#23269520)
There are lots of performance sensitive tools, language runtimes, and cross-platform libraries written in C.
Re:Goals and Priorities for C++ by pjmlp on Friday May 22, 2020 @03:48AM (#23269630)
And even more written in C++. Should we start counting which ones?
Re:Goals and Priorities for C++ by saagarjha on Friday May 22, 2020 @03:50AM (#23269644)
Hmm, I’m not sure I’d readily agree.
Re:Goals and Priorities for C++ by pjmlp on Friday May 22, 2020 @04:50AM (#23269959)
Starting by Clang and GCC, I bet that for most relevant C projects there is somehow an equivalent written in C++, or even more than one, with the exception of UNIX kernel clones.
Re:Goals and Priorities for C++ by sanxiyn on Friday May 22, 2020 @09:19AM (#23271697)
Let's start with CPython. What is an equivalent written in C++? (Note: there is an equivalent written in both Java and C#. But not C++.)
Re:Goals and Priorities for C++ by pjmlp on Friday May 22, 2020 @09:53AM (#23272061)
I guess Numba might quality.

Then we have Pyston, and the ill fated unladen-swallow.

Re:Goals and Priorities for C++ by worik on Friday May 22, 2020 @03:23AM (#23269495)
I have spend the quarantine hacking in C. On FreeCIV.

Still used lots and lots of places

Re:Goals and Priorities for C++ by pjmlp on Friday May 22, 2020 @03:48AM (#23269633)
Same can be said by any programming language, C is the Cobol of systems programming languages, so as long as there UNIX FOSS clones it won't go away.
Re:Goals and Priorities for C++ by hannofcart on Friday May 22, 2020 @04:42AM (#23269900)
Freeciv fan here. What are you working on in it?
Re:Goals and Priorities for C++ by worik on Thursday May 28, 2020 @07:05AM (#23335903)
Forked Attitude AI and making a rules based AI
Re:Goals and Priorities for C++ by jonstewart on Thursday May 21, 2020 @11:32PM (#23268416)
C++ has been greatly reinvigorated this past decade with language and compiler modernization. Few C++ programmers decamped to Go; most of Go’s adoptees came from Python. Go doesn’t have all that much to offer a C++ programmer.
Re:Goals and Priorities for C++ by dodobirdlord on Friday May 22, 2020 @12:21AM (#23268595)
> Go doesn’t have all that much to offer a C++ programmer.

Concurrency and parallelism without debugging hell is huge.

Re:Goals and Priorities for C++ by adev_ on Friday May 22, 2020 @03:29AM (#23269533)
> Concurrency and parallelism without debugging hell is huge.

There is plenty of libraries in C++ that haves you concurrency and parallelism without debugging hell.

Hell in concurrent code comes when you have shared state, and that is valid for both Go and C++. Using shared Golang Map in multi-threaded code is a very good example of deathtrap, even if it's in Go.

Re:Goals and Priorities for C++ by gumby on Friday May 22, 2020 @01:41AM (#23268984)
C++ will be getting a concurrency model, likely in C++23. As with other language features the position papers and implementations refer not only with their authors’ experience with C++ efforts (libuv, asio, pthreads) but other languages as well, such as go.
Re:Goals and Priorities for C++ by pjmlp on Friday May 22, 2020 @02:24AM (#23269197)
C++20 offers both with very nice graphical debuggers, which Delve isn't really a match for.
Re:Goals and Priorities for C++ by abjKT26nO8 on Friday May 22, 2020 @05:56AM (#23270335)
What graphical debuggers for C++ do you recommend?
Re:Goals and Priorities for C++ by pjmlp on Friday May 22, 2020 @06:03AM (#23270373)
Visual C++ ones.
Re:Goals and Priorities for C++ by abjKT26nO8 on Friday May 22, 2020 @06:38AM (#23270607)
That's not really an option for me when I debug C++ that is run on a Linux or Android TV. It also wouldn't be an option when I used to work with C++ that was used on Linux servers. That's a big chunk of C++ use.

While I have your attention, I see your comments here in C++ threads quite often. You seem to like the language and at the same time you have some experience with simpler languages like Oberon. My experience with C++ has been that people happily go on to create giant inheritance hierarchies, with no restraint for multiple inheritance to the point that it's so unmanagable that nobody knows where things go and what actually happens. With all that inheritance, they lose track that the same thing has actually been copied tens of times between different classes and now these tens of classes have code that is basically copy-pasted and who knows what benefit anyone has from all this inheritance. Google engineers are one of the offenders when it comes to overuse of inheritance. Then, modern C++ allegedly fixes some warts, but IME it introduces more of them. E.g. the initialization fiasco (I honestly can't say with 100% confidence what braces do when you initialize std::vector). Then there is this thing that when you create a lambda like so:

  [&] { ... }
And then move it to a function which will create lambdas of this form, just with different captures:

  std::function<void()> create_lambda(args...) {
      return [&] { ... };
  }
The second version will crash later when you run the lambda. Because it turns out that "[&]" just copies the stack pointer and isn't syntactic sugar for enumerating all the variables that you capture. This was non-obvious to me and it was really hard to track down the first time I encountered this problem. I think "[&]" is broken. Similarly, std::thread crashing in destructor when the user doesn't call std::thread::join, nor std::thread::detach. The ambiguity of syntax... I just don't buy that "modern C++" makes things particularly better. It sometimes makes them worse.

Don't you experience the same fatigue as I do?

EDIT: Oh, I just remembered another thing: at a previous job we discovered that MinGW's implementation of std::random_device just returned 0 every time. It is major facepalm for MinGW, but also for the C++ standard for making this behaviour allowed (yes, it's actually compliant with the standard). And even after it was fixed, there are still systematic issues with this whole randomness API. E.g. you can't actually seed it properly[1].

[1]: https://codingnest.com/generating-random-numbers-using-c-sta...

Re:Goals and Priorities for C++ by pjmlp on Friday May 22, 2020 @07:55AM (#23271121)
Well, Android Studio also has Clion debuggers integrated, which although not at the same level of visualization capabilities, they are quite further than bare bones alternatives.

Fun fact, due to continuous ranting regarding C++ support from game developers, not only did Google announce at GDC 2020 that they are upping their game regarding C++ tooling on Studio, they will also provide Android plugins for Visual Studio.

When people discuss Oberon, they tend to focus on Oberon (1992) or the minimalist approach that Niklaus Wirth has pursued later with Oberon-07.

When I talk about Oberon, I think beyond my early experiences with Native Oberon, and also include Oberon-2, Component Pascal, Zonnon and Active Oberon into the mix. The Oberon language linage, not all of them done directly by Wirth.

In that sense, for me Oberon is what EHTZ nowadays uses as Oberon, namely Active Oberon.

http://cas.inf.ethz.ch/projects/a2/repository/raw/trunk/Lang...

You will find out that minimalist Oberon is long gone and the language in a certain sense compares to C#, D in complexity, with support for generics, untraced references, exceptions, linkage models, inline Assembly.

Because that is the problem with minimalist languages, library boilerplate just grows to emulate what should have been in the language to start with. In Oberon's case, Active Oberon is the result of many years of research and student thesis doing OS implementations in Oberon, while noticing that stuff like generics, untraced references, inline Assembly are quite useful.

As for C++, while I still enjoy using it, nowadays it is mostly a tool for OS integration libraries and GPU shaders (HLSL/Metal/CUDA), I rather write the main code in .NET languages, Java or some other managed language.

Re:Goals and Priorities for C++ by abjKT26nO8 on Friday May 22, 2020 @08:13AM (#23271255)
> You will find out that minimalist Oberon is long gone and the language in a certain sense compares to C#, D in complexity, with support for generics, untraced references, exceptions, linkage models, inline Assembly.

Generics is something I can't live without, to be honest. But I don't like C++'s implementation of generics. The error messages they generate and the whole SFINAE business make for a horrible programmer experience. Rust has the best implementation that I know of currently. Inline assembly sure is useful.

Anyway, thanks for the extensive answer. I think I understand your point of view better now.

Re:Goals and Priorities for C++ by UncleMeat on Friday May 22, 2020 @12:04PM (#23273525)
> I think "[&]" is broken.

I feel like this is consistent with the "pay for what you use" design. Why capture all variables in scope by copies when you can just capture them all as references (which might go out of scope)? If you truly need to capture other stuff, you can do so using more syntax. If "[&]" did what you describe then "wtf, why is it saying I have a deleted copy constructor for some value I'm not using" or "wtf, why is my code so slow because of unnecessary copies of large objects" would be all sorts of fun.

Re:Goals and Priorities for C++ by abjKT26nO8 on Friday May 22, 2020 @02:16PM (#23275186)
"&" captures references, not copies. I would like it to be just syntactic sugar for "&x, &y, ..." and only include the variables that I actually used in the body of lambda. There is no performance cost to that (unless a crash is somehow a performance win --- hey, the program finished earlier, I guess it's faster...).
Re:Goals and Priorities for C++ by UncleMeat on Friday May 22, 2020 @10:31PM (#23279316)
But the complaint was about lifetimes. You seem to want copies (if I understood your post correctly).
Re:Goals and Priorities for C++ by gpderetta on Friday May 22, 2020 @09:26AM (#23271765)
> it turns out that "[&]" just copies the stack pointer and isn't syntactic sugar for enumerating all the variables that you capture

it doesn't copy the stack pointer, but it enumerates all variables you use and captures a reference to it (I think the &, as used in address-of and references kind of gives it away). [=] {} unsurprisingly captures by value.

Some compilers do warn when you return lambdas capturing local vars by reference, but it is not super reliable.

Re:Goals and Priorities for C++ by abjKT26nO8 on Friday May 22, 2020 @11:01AM (#23272817)
At one job I wrote the equivalent of the following (it's just that I invoked create_lambda more times):

  #include <functional>
  #include <iostream>
  
  std::function<void()> create_lambda(const int& x, const int& y) {
      return [&] {
          std::cout << "x: " << x << "\n";
          std::cout << "y: " << y << "\n";
      };
  }
  
  int main() {
      int x = 5;
      int y = 7;
  
      const auto f = create_lambda(x, y);
  
      f();
  }
And it crashed. There were no local variables in create_lambda and the lambda crashed in the same function that create_lambda was called in. When I try to reproduce it now, it doesn't work. Not sure what's different, but this is basically what happened.
Re:Goals and Priorities for C++ by gpderetta on Friday May 22, 2020 @09:32AM (#23271849)
> std::thread crashing in destructor when the user doesn't call std::thread::join, nor std::thread::detach.

this has been 'fixed' with jthread. FWIW I think it is a mistake, blocking in a destructor is can easily lead to deadlocks (I have first hand experience, it is not just a theoretical issue). Detaching is not an option either.

Re:Goals and Priorities for C++ by vips7L on Friday May 22, 2020 @12:42AM (#23268702)
Swift? I didn't know it had much use outside of mac/iOS. It seems like a cool language otherwise.
Re:Goals and Priorities for C++ by _bxg1 on Friday May 22, 2020 @01:25AM (#23268892)
It just recently got official support for Windows and Linux, and it had low-key Linux support for a while before that. I've heard of people writing web servers in it. Like Go, it compiles directly to native machine code.
Re:Goals and Priorities for C++ by vips7L on Friday May 22, 2020 @01:33AM (#23268941)
Isn't it still slower than GO because of referencing counting?
Re:Goals and Priorities for C++ by _bxg1 on Friday May 22, 2020 @02:01AM (#23269080)
Depends what you mean by slow. Go is garbage-collected, Swift is reference-counted. Each has advantages and disadvantages. But also, that doesn't apply to stack-allocated values. It's not as simple as one being faster than the other.
Re:Goals and Priorities for C++ by throw_m239339 on Friday May 22, 2020 @12:07AM (#23268541)
> There are reasons that C is a declining language.

Unfortunately, it is not. C++ is certainly too complicated, that's why it failed at replacing C, and that's why Rust will fail at replacing C as well.

Re:Goals and Priorities for C++ by pjmlp on Friday May 22, 2020 @02:32AM (#23269239)
It only failed on UNIX FOSS clones and embedded C only boards.

All major C compilers are written in C++ nowadays.

Apple OSes use C++ for device drivers, GPGPU programming and their compiler infrastructure.

Google OSes use legacy C drivers for Linux and everything else is a mix of C++, Java, Rust, using micro-kernel like architecture where each driver gets their own process.

On Windows it has been long considered persona non-grata and everyone advised to either move to C++ or adopt Clang (also provided via VS installer) if they insist in using C. VC++ only supports C to the extent required by ISO C+++ compliance.

One of the reasons OpenCL lost to CUDA was the initial refusal of Khronos to offer similar C++ tooling, making many researches jump to NVidia.

Re:Goals and Priorities for C++ by radarsat1 on Friday May 22, 2020 @03:37AM (#23269572)
> On Windows it has been long considered persona non-grata

You say this as if it is the fault of C. I see it the other way around -- Microsoft's refusal to implement C11 is singlehandedly contributing to the decline of C, because they've leveraged their large OS market share to make it impossible to use an update of the language for cross-platform development. They are killing it on purpose, and it's infuriating.

Re:Goals and Priorities for C++ by pjmlp on Friday May 22, 2020 @03:45AM (#23269616)
It is, because the C culture is unwilling to accept any language change that improves the language security.

Anyone that wants a C like language with better security has decided that the only path forward is to either ditch it, or impose hardware memory tagging (which Google is imposing on as of Android 11).

Microsoft still supports C in its Checked C variant and just like Google, Oracle and Apple on their platforms, its hardware hardened Azure Sphere Pluton runtime.

C was already on decline in the late 90's, all major desktop and mobile OSes were being written in C++, BeOS, Symbian, Windows with OWL/VCL/MFC, OS/2 with CSet++, Mac OS with MPW/PowerPlant, game developers were moving into C++ with Watcom C++ and PSOne devkit, it was the rise of FOSS UNIX clones with the FSF manifesto to use C as much as possible that changed the wind, thankfully that course has been finally overturned.

The decline of C in an always connected computing world is done by WG14's lack of action.

Re:Goals and Priorities for C++ by saagarjha on Friday May 22, 2020 @03:30AM (#23269536)
> Apple OSes use C++ for device drivers

Embedded C++, and the kernel is pure C.

Re:Goals and Priorities for C++ by pjmlp on Friday May 22, 2020 @03:35AM (#23269565)
Embedded C++ is a C++ subset, it is as valid C++ example as those embedded C dialects that aren't able to fully support the ISO C standard library, yet people still call them C.

And as of Driver Kit introduction, 100% full C++ is now an option.

In a couple of years from now, when the full transition of kernel extensions to user space modules is complete, the kernel will be the only C piece left.

Which Apple most likely won't bother to rewrite due to the historical baggage of mixing BSD with Mach code that probably no one is willing to re-write.

Re:Goals and Priorities for C++ by dodobirdlord on Friday May 22, 2020 @12:26AM (#23268622)
Fortunately for Rust it's very easy to use a simple subset of the language. Lots of tough borrowing issues don't show up if you stick to the stack, and you can get very far with just the stack and some heap allocated vectors and maps. Not everybody needs to implement an async runtime.
Re:Goals and Priorities for C++ by jacoblambda on Friday May 22, 2020 @05:24AM (#23270146)
From someone who has been interested in Rust for a long time but is only now really getting into it due to time constraints, why do you consider Rust too complicated to replace C?

From what cursory knowledge I have, Rust maintains both a bare bones standard library suitable for embedded work as well as a more fully featured standard library that is built on top of that minimal library.

What features would keep Rust from becoming a new C other than possibly some issues with ABI stability that from my understanding people are working to resolve?

Re:Goals and Priorities for C++ by cozzyd on Thursday May 21, 2020 @10:58PM (#23268280)
It makes C++ much less useful to write a library in (or, you have to maintain a fragile C layer). I take it you've never had to deal with a libstdc++ ABI boundary before?
Re:Goals and Priorities for C++ by google234123 on Thursday May 21, 2020 @11:20PM (#23268365)
You can continue working in a world without the small string optimization if you want. There is already precedent.
Re:Goals and Priorities for C++ by CoolGuySteve on Thursday May 21, 2020 @11:35PM (#23268430)
I want a world where the compiler knows when it can use that optimization instead of me bludgeoning it with a global define.

Like you said, it's not even that far fetched.

Re:Goals and Priorities for C++ by gumby on Friday May 22, 2020 @01:43AM (#23268995)
It’s a library feature not as compiler feature so you can’t really get out of telling the compiler which library to use, Eben if what you say is nothing (meaning “default library”)
Re:Goals and Priorities for C++ by adrianN on Friday May 22, 2020 @12:30AM (#23268645)
Maintaining a C layer is standard practice for many libraries because that enables their use from a variety of programming languages. Consequently, the tooling around that is quite mature.
Re:Goals and Priorities for C++ by cozzyd on Friday May 22, 2020 @12:56AM (#23268776)
Sure, but if C++ had a stable ABI, then it would be more practical to directly wrap it. SWIG has some support for C++, after all, and there are a lot of C++ wrappers (e.g. ROOT, pybind11 and Boost.Python can all automagically generate python bindings for C++), but guess what happens when you mix libraries compiled with different std::basic_string ABIs...
Re:Goals and Priorities for C++ by pjmlp on Friday May 22, 2020 @02:25AM (#23269201)
It has two on Windows, they are called COM and UWP, although technically it is just one as UWP is an evolution from COM.

It has has one on IBM i and z/OS, as part of the language environments.

Re:Goals and Priorities for C++ by zozbot234 on Friday May 22, 2020 @08:50AM (#23271472)
C++ has the stable Itanium ABI too, but that doesn't help when needing to bind with code that uses templates or preprocessor macros since those features are inherently language dependent. That's why re-wrapping the code with a C-compatible ABI is often a better approach. COM can also be accessed from C, by the way.
Re:Goals and Priorities for C++ by pjmlp on Friday May 22, 2020 @09:58AM (#23272103)
COM can be used by C if you are a masochist and feel like doing COM "Assembly" programming without some of the compiler hand holding, it got even worse with UWP that uses .NET metadata files, with support for a .NET like type system.

I guess when one is bored might try to re-implement ATL, WTL or UWP projections with C macros.

Re:Goals and Priorities for C++ by codewiz on Thursday May 21, 2020 @10:53PM (#23268249)
These things come with a performance cost and constraints on how the language can evolve.

I would argue that C++ needs to increase the pace of change if it wants to remain relevant. Rust, Go, Swift and Kotlin are though competition, while C++20 is still lacking in agility, safety and modularity.

Re:Goals and Priorities for C++ by CoolGuySteve on Thursday May 21, 2020 @11:18PM (#23268353)
What's more modular and agile than being able to link another library you didn't compile yourself without worrying about your language version or compiler?

C++ build systems are already worse than all the languages you mentioned in part because there's no module support.

I also disagree that it would hurt performance. If the logic contained in "-D_GLIBCXX_USE_CXX11_ABI=0" was formalized to allow backwards compatibility, libraries would snap together more easily while still preserving inlining better than C ABI exports are able to.

Re:Goals and Priorities for C++ by dodobirdlord on Friday May 22, 2020 @12:35AM (#23268670)
> What's more modular and agile than being able to link another library you didn't compile yourself without worrying about your language version or compiler?

The point of the document is to lay out the goals and priorities of the authors, not to argue that they are universally applicable. The authors compile everything from scratch with the same version of the compiler, down to the OS kernel.

Re:Goals and Priorities for C++ by titzer on Thursday May 21, 2020 @11:49PM (#23268470)
> Rust, Go, Swift and Kotlin are though[sic] competition, while C++20 is still lacking in agility, safety and modularity.

What is the point of fighting to stay relevant by going after use cases that are being served by these other languages? Is it just to win and have more "mind share"? Is it to make the biggest tribe? That seems like a social goal, not a technical one.

Re:Goals and Priorities for C++ by dodobirdlord on Friday May 22, 2020 @12:56AM (#23268775)
It defends their investment, both in the skills they have built up and the existing code that they have created.
Re:Goals and Priorities for C++ by hoseja on Friday May 22, 2020 @04:51AM (#23269963)
The ABI breaks when you change string implementation to use an optimization for small strings. Therefore you can't optimize them without breaking ABI.

C has no strings.

The optimization was considered vital enough for a rare break to actually happen but there are multiple such clear wins that cannot be implemented because of ABI stability. Sometimes it's a major pain to have to keep piling the cruft on.

Re:Goals and Priorities for C++ by Figs on Thursday May 21, 2020 @11:18PM (#23268358)
These aren't the standard's committee's goals. They're Google's, NVIDIA's, and the other proposal author's goals.

As a community, we absolutely should reject this proposal and insist that the standards committee continue to support compatibility. Repeating Python3's mistake in C++ would be a nightmare!

Re:Goals and Priorities for C++ by jcelerier on Friday May 22, 2020 @02:39AM (#23269274)
> For fucks sake, C has been stable for decades but somehow C++ just can't manage?

the -std=c++03 mode of the compiler is pretty stable... but not many people care about that anymore. If they cared google would be building their next kernel in C, not in C++

Re:Goals and Priorities for C++ by gpderetta on Friday May 22, 2020 @09:37AM (#23271909)
you can compile with -std=c++20 and still use the C++03 ABI (of course std::string will not be compliant then). The two flags are unrelated.