r/cpp • • Jan 11 '26

CppCon Making C++ Safe, Healthy, and Efficient - CppCon 2025

https://youtu.be/p52mNWsh-qs?si=Bz6pyW6d0SMLCZxV

Now with some updated content since the ACCU talk, and the Q&A is nonetheless interesting.

57 Upvotes

103 comments sorted by

View all comments

Show parent comment

18

u/Beetny Jan 12 '26

They're going to keep reaching as far as it takes to avoid acknowledging:

  1. Circle was right
  2. Circle was right

13

u/James20k P2005R0 Jan 12 '26

I'm genuinely starting to think that the only solution to this is a hard fork. Its pretty apparent from this talk that its all about maintaining legacy code, but for new code its strictly worse than alternative approaches. To make C++ viable into the future it needs a high performance, safe subset, and there's no way around that

5

u/jeffmetal Jan 12 '26

How do you hard fork C++ though? the standard is owned by ISO so any copying will get you into legal trouble if you start writing your own standard.

Also it seems large companies are pulling away from C++ at the minute so who is going to pay for it.

5

u/James20k P2005R0 Jan 12 '26

You'd need to attract sponsorships from large companies who are similarly dissatisfied with C++'s development, under the banner of a Rust style foundation. Ideally you want a few big name C++ people on board, so you can get enough legitimacy for it. Its a lot more money and investment to write new code in Rust while you have legacy C++, so I suspect there'd be funding available for a much more compatible language that requires less developer retraining. You also need to get at least one of the big 3 compilers onboard, or get sean baxter to open source circle

I think having a standard as your authoritative source of the language is a somewhat unnecessary model - you likely need something more formal than Rust, but a single comprehensive spec is likely unnecessary (vs a series of formal documents, like python's PEP). Down the line, you could write up a non normative spec ala ferrocene

In a more broad perspective, if wg21 wanted to leave ISO as a whole, it may well be possible to get ISO to simply release the spec, but of course you couldn't do that with a hostile hard fork

Its possible, it just needs the right group of people to sign onto it

4

u/pjmlp Jan 13 '26

The way I see it, it appears Bloomberg is that large company left around.

Apple, Google, Microsoft, each are having their own languages, and like everyone else in the planet seem to be happy enough with what you can already do with C++ today, not necessarly hunting down being up to date with ISO.

GCC development seems to be mostly sponsored by Red-Hat/IBM, which aren't also racing for latest ISO, and nowadays has a pleothora of safe languages frontends.

VC++, we already know how it is going from the outside.

So we are left with however wants to keep up pushing clang, under such foundation banner, besides Bloomberg, maybe NVidia given CUDA.

3

u/servermeta_net Jan 12 '26

Sounds like Google carbon

4

u/James20k P2005R0 Jan 13 '26

Carbon is significantly syntactically different to c++. Ideally a successor language would maximally maintain syntax compatibility

5

u/Business-Decision719 Jan 13 '26

Right, and then you're back to square one. The (would-be) safe language is beholden to (unsafe) legacy code/practices.

1

u/James20k P2005R0 Jan 13 '26

Sure, but you can define a much nicer interop story between that safe language with C++ syntax, and the legacy unsafe C++. Eg you could potentially define containers to be ABI compatible, and share datastructures without copying

4

u/Business-Decision719 Jan 13 '26

Hopefully that is possible and will work out. So far the attempts to fix the C++ safety problems have gone:

  • Not a fork, just safety proposals that try and fail to reform C++ from within. (Safe C++ died in committee, profiles are still speculative.)
  • Not C++, instead a new specification is created by a different group and inevitably becomes its own language with incompatible syntax. (Java, C#, D, Rust, Carbon)

The fact that a truly reformed "alternative C++" hasn't already emerged that is truly backwards compatible suggests to me that C++ probably can't have the compatibility cake and safely eat it too. If you change enough that things are actually different, then it's no longer trivially compatible with C++ and is therefore either stillborn (Safe C++), likely unrealistic (profiles), or a new language entirely (Rust). Maybe there's a safety/compatibility sweet spot that just hasn't been stumbled upon yet.

But realistically, if Carbon's interop isn't good enough, despite being purpose built for that by an unstoppable monopoly megacorp for its own indispensable horde of legacy C++ code, I am not sure the problem is solvable.

2

u/James20k P2005R0 Jan 13 '26

Personally I think carbon's interop could be a lot better. The language makes a tonne of syntactic changes, whereas we could have a much more syntactically compatible language

What I want is just a C++ with significant safety extensions, where regular C++ will still compile by default. The safety extensions would be significantly different - you need a new standard library, and some new syntax, but you can still keep a lot of C++ whihc lowers the burden vs carbon or Rust

1

u/AnyPhotograph7804 Jan 13 '26

There is a "hard fork", it is called Rust.

4

u/James20k P2005R0 Jan 13 '26

It clearly is not

2

u/Wonderful-Wind-905 Jan 13 '26

I do not understand why you were downvoted. You are factually correct.

2

u/James20k P2005R0 Jan 14 '26

Its pretty common, it doesn't help that I've acquired a few dedicated weirdos over the years

4

u/Wonderful-Wind-905 Jan 13 '26 edited Jan 14 '26

But irrespective of the correctness of that claim, Circle was also closed-source, hindering adoption.

2

u/pjmlp Jan 15 '26

Back in the 1990's all C and C++ compilers worth using were all commercial, though.

Sean Baxter was also looking for sponsorship, which did not happen.

3

u/Wonderful-Wind-905 Jan 15 '26

But the situation is very different from the 1990s, and GCC tried to add support already in the late 1980s:

 1987: C++ support in GCC 1.15.3

Even Apple open-sourced Swift within one year of it appearing.

 It was initially a proprietary language, but version 2.2 was made open-source software under the Apache License 2.0 on December 3, 2015, for Apple's platforms and Linux.

People cannot contribute to a closed-source compiler, and they are wary of building programs in a language where only one closed-source vendor is available.

The main programming language that comes to mind regarding its compilers mostly being closed-source, in the current day and age, is Ada. Maybe you are fond of Ada or related to Ada, I don't know.

The sponsorship thing is unfortunate, but the compiler being closed-source likely didn't help. I can understand Sean Baxter wanting to be compensated for his work, but I don't believe that his approach was the most strategic. The economics of programming language development are indeed screwed up. It almost seems most suited for being financed indirectly by universities doing public research for the common good. But that has drawbacks as well.

1

u/bitzap_sr Mar 14 '26

Completely agreed. If Safe C++ was implemented in Clang, with a -fsafe or whatever switch, it could gain traction and evolve, and eventually parts of it could find its way to ISO c++. Sean would have likely gotten a job somewhere maintaining and evolving this, from some big tech who would feel much safer relying on a clang mode than on a new proprietary compiler with not much industry use. I've gotten downvoted significantly in the past for suggesting this.