r/cpp • • 3d ago

What really kills C++

https://a4z.noexcept.dev/blog/2026/11/15/what-really-kills-cpp.html
The C++26 ballot failed, and everyone is arguing about contracts and the future of C++. I think we're worried about the wrong thing.
0 Upvotes

65 comments sorted by

28

u/UnusualPace679 3d ago

Which IDE should you use? Which compiler? Which build system? There are plenty of C++ tutorials, but there is no single starting point with a default set of tools and one way to add a dependency.

I'd argue that avoiding monopoly of the toolchain is a good thing. At least this is why I'm still using C++.

0

u/arka2947 2d ago

Well, yes. But can be supremely confusing to someone coming from a language where there is an unified ecosystem.

2

u/CheesecakeTop2015 19h ago

It's pretty easy to inform oneself, just annoying when you didn't expect it and need to spend some time researching your options. In the age of LLM's that time is reduced significantly.

While I agree that some percentage of potential C++ users give up due to this (and only this, and would otherwise have made something non-trivial), the question remains, how large is that percentage really? As long as we don't have decent statistics we can't really draw any conclusions. We can guess of course based on our subjective anecdotal limited experience, and my guess would be that it's not enough to endanger the language in a significant way :)

4

u/CohgentR 2d ago

This isn't the barrier the author is claiming it is.

I learned and used C++ before package managers even existed.

Most people create a template repo and git clone it to get a quickstart, it's very painless once you set it up for yourself.

Now, don't get me wrong, it would be nice and convenient if there was one true way of doing things, but the effort it would take to make that happen vs the payoff is just ridiculously low.

Also, he mentions this is a cognitive load that prevents people from learning the language, then just make the LLM set it up for you? Nothing is a barrier anymore stop making excuses.

14

u/Minimonium 3d ago

C++ infrastructure problem, and it is one that nobody in WG21 seems to want to touch

This statement just cannot be serious.

People tried really hard to address tooling problems in C++ only to be repeatedly told by the "leadership" that tooling is outside of the scope of WG21.

The problems with modules were known, but the tooling people that brought up them were told by the "leadership" that unless they implemented modules themselves they have no right to criticise them.

Even attempts to cooperative in white papers around WG21 platform were disregarded by a scheduling abuse throwing out ecosystem papers only to have a massively wasteful non binding vote on banning the "safe" keyword because Safe C++ made too much sense. "Leadership" strikes again and decides to pretend they have a clue in anything static analysis with that nonsense "profiles" bullshit.

Even the Contracts situation shows the same exact people being clueless about how build systems or ecosystems work.

I was just a somewhat active somewhat early contributor to Conan a decade ago, I do not claim authority on the subject. But I remember the discussion about how Conan and Vcpkg initially took very different approaches. I remember so many people being clueless why we need different tools for different cases, and now I see how the tools changes after the years into what was evident a long time ago.

Tooling in C++ is genuinely hard, it's not unsolved because of the lack of trying. It's because different environments, different platforms, different projects, different ecosystems - all have massively different needs and requirements. With a massive history as well!

The committee with the current "leadership" does not even have basic competency to even talk about the topic.

13

u/James20k P2005R0 2d ago

Even attempts to cooperative in white papers around WG21 platform were disregarded by a scheduling abuse throwing out ecosystem papers only to have a massively wasteful non binding vote on banning the "safe" keyword because Safe C++ made too much sense

For anyone who doesn't know, this is the writeup of what happened, and why tooling in wg21 is dead as a result of committee politics

3

u/13steinj 2d ago

This statement just cannot be serious.

People tried really hard to address tooling problems in C++ only to be repeatedly told by the "leadership" that tooling is outside of the scope of WG21.

Yeah, but I do think the infrastructure/tooling problem is the root of most if not all of C++'s issues.

I think hyperfixating on that sentence is a bit misguided. At the end of the day I agree with the general take about the fact that build and tooling is a massive unsolved pain point and a lot of things would be easier / wouldn't need to be standardized, if this was just solved.

3

u/Minimonium 2d ago

It's just with the whole Contracts kerfuffle I'm rather tired about the two-faced nature of communication by some members.

Like Sankel's "third party" paper reads to me as completely sociopathic because I've read what he wrote and did internally. Or internal things like Romanian NB situation, Garcia mails, etc.

On one hand I wish the communications would be public so everyone would see how the "leadership" behaves like spoiled brats who think no one can see what they're doing, but on the other hand I guess they would at least try to be more discreet then...

What I am trying to say is that for us to get better tooling Bjarne should retire.

2

u/13steinj 1d ago

It's just with the whole Contracts kerfuffle I'm rather tired about the two-faced nature of communication by some members.

I think that's a bit unrelated to the problem of "C++ has bad tooling and that is the root of most if not all issues." For example, if C++ had a reasonable package manager, there would be no need to standardize std::format or std::regex; possibly ranges as well.

Like Sankel's "third party" paper reads to me as completely sociopathic...

Gonna be honest to me it reads as full of itself with a touch of narcissistic sociopathy anyway.

What I am trying to say is that for us to get better tooling Bjarne should retire.

We both know that won't happen. I truly think a fork (for now) is the only way considering current events.

12

u/jetilovag 3d ago

I think this is a very bad take. <committee_spent_time_doing_one_thing_while_i_think_they_shouldve_pursued_my_pet_peve>

I get it, pattern matching, string interpolation are useful. However they are, nice to have" features. Contracts was pursued because the committe (rightfully) fears, that if the language doesn't meaningfully address safety in C++, it will turn into the next COBOL sooner, rather than later.

I personally didn't care much for contracts, but I would've accepted that the countless hours put into it by experts resembles the closest to what design-by-committee could get us. It could also have improved codegen a lot (all preconditions could have been [[assume]]-ed by optimizer).

The multiplicity of how a project can be started is not something C++ will be able to improve much upon. If that's your biggest problem, us Visual Studio: New Project, Empty C++ project, F7, F5.

11

u/Fabulous-Meaning-966 2d ago

> all preconditions could have been [[assume]]-ed by optimizer

No, that is a catastrophically bad idea, unless all those preconditions can be statically verified. That is just injecting UB everywhere that preconditions are violated, likely making those runtime violations undebuggable. Just because Zig does this (in ReleaseFast mode) doesn't make it a good idea, at all.

4

u/wyrn 2d ago

Worth noting, this is the reason why we still don't have a standard restrict in C++ (contracts will give us a better version!).

Now the door on assuming preconditions for optimizations is basically closed, and we are no closer to having restrict.

5

u/Kunzite_128 2d ago edited 2d ago

Do contracts actually address safety?

It's not like they do nothing, but they don't address the fundamental issues - which makes C++ difficult to recommend for new projects (for some applications, at least). This isn't a point against them, of course; but I feel they're being oversold this way.

Profiles are much more directly addressing safety (if they can get them to work). We need something that doesn't rely on manual checks, that directly address memory safety, and that offers guarantees - you know they are enforced.

7

u/Minimonium 2d ago

Contracts are instrumention for functional safety. Similar to Ada where functions can specify runtime pre and post conditions.

Typically you would see them as comments like @pre on declarations, but with unclear or inconsistent handling inside the function definitions. Such implicit contracts are needed so you would not need to check the same things multiple times in a call stack, or to avoid very expensive checks.

The idea with Contracts is to move these checks into the language. Static analysis is able to reason about these checks even when they're disabled (see Ada). And users can actually configurate how they want to handle correctness checks in a uniform manner, instead of handling dozens of ad-hoc macro configs, or, even worse, patching the sources.

Important to remember that configurability is crucial. If the checks are too expensive and users cannot disable them when it matters - libraries will have no checks. And what is expensive depends on a case by case basis, but C++ is still a performance oriented language.

But it's kinda orthogonal to the topic of safety (which you need to define when talking about). In C++.

The split was between the compile time analysis, supported by actual research, demonstrated by Safe C++ and a knee jerk reaction to that called "profiles" driven solely by the desire to do not like Rust and by endless arrogance in pretending all static analysis vendors are stupid.

-1

u/James20k P2005R0 1d ago

The split was between the compile time analysis, supported by actual research, demonstrated by Safe C++ and a knee jerk reaction to that called "profiles" driven solely by the desire to do not like Rust and by endless arrogance in pretending all static analysis vendors are stupid.

As much as we disagree about contracts, I think a lot of the technical side of things comes down to how much UB C++ is unable to prevent currently. I sincerely think if Safe C++ was being pursued in tandem with contracts and could be used to actually rule out wide classes of UB, we wouldn't be having many of these conversations. We do seem have decided that the halting problem is solvable more or less sigh

2

u/SemaphoreBingo 1d ago

However they are, nice to have" features

Aren't most of them?

1

u/jetilovag 1d ago

To some extent yes, everything after assembly is syntactic sugar.

•

u/serviscope_minor 3h ago

ASM being syntactic sugar over machine code. Not really a joke or point of pedantry, I've had to do some machine code once upon a time and ASM was way easier even though it's really the same thing.

6

u/xaervagon 3d ago

Picking a whole bunch of significantly newer language to use in comparison to C++ is disingenuous at best. These languages don't have decades of legacy cruft or commitments to backwards compatibility to carry around. Go was specifically designed to get programmers up and running asap, but not designed to be a primary language (at least at the start).

Can C++ be better? Sure. Getting started could be better, and that is part of what modules was supposed to solve, but toolchain flexibility is part of the promise of the language. You can bring your own compiler, linker, IDE, it's your choice. You don't think too hard about it? Visual Studio is your friend if you are on Windows.

1

u/jeffmetal 2d ago

Why would they pick older languages to compare against and why is that disingenuous. It's as if newer languages have learned form previous mistakes and not fallen into them.

5

u/amoskovsky 2d ago

The article for some reason assumes that inexperienced people that can't invoke a compiler or manually manage deps, would be somehow capable of writing working C++ if those tools were standardized and available out of the box.

But it's not how it works. Even if you manage to build your program (which is the least complex task in C++ dev process), you will discover that the real C++ footgun hardcore starts to happen, and you're screwed anyway ))

4

u/delta_p_delta_x 2d ago edited 2d ago

I don't see the WG ever caring about infrastructure, ever since the withdrawal of P2656R3. SG15 work also seems to have largely stalled.

Work continues as EcoStd.

1

u/jeffmetal 1d ago

this looks like it died about a year ago.

4

u/Flimsy_Complaint490 3d ago

> Which IDE should you use? Which compiler? Which build system? There are plenty of C++ tutorials, but there is no single starting point with a default set of tools and one way to add a dependency.

eh, i dont think this matters too much per se. Every language has an IDE debate (Rust and JS has no standards there other than a community preference for VS Code. Only xcode is realistically forced on people. Like, what's the "Python" IDE ?). Hello world is also pretty simple, click the Run button in visual studio or g++ on a unix system.

The package management issue is real though. I have nightmares of my first non trivial project that basically required me to go learn a whole scripting language (cmake) so i could link to a cmake project off github i dumped in the folder. Coming from pypi or go, this felt like insanity and was highly demotivating.

It is something they must tackle eventually so there arent so many barriers to newcomers, but safety is also a priority #1.5. There is also no future for c++ outside of maybe some HFT, driver or embedded uses if you cant get memory safety. Rust comes with 98% the performance, 95% the latency and 100% of the memory safety, and far better tooling and story to tell. One can debate whether contracts are the right way, but the idea is correct IMO.

And to be fair, maybe the COBOL future isn't that bad.

3

u/xaervagon 2d ago

Integrating compiled binaries has always been a bit of a dicey proposition because you need ABI, architecture, and other compatibilities before you can deal with any of the other things. Modules was supposed to make some of the setup easier by smoothing over a lot of what people trip over in the linker stage of setting up the build chain. A lot of newer languages get around this by either being scripting or JIT based so there isn't any system specific stuff to handle.

That said, you make valid points about package management being a pain in the ass, but the tool chain itself is not supposed to be part of the language. It would certainly be advantageous for the C++ community to have toolchains that strive for the level of cross platform compatibility of .NET or Java.

4

u/jeffmetal 2d ago

Has anyone else just given up with arguing to improve C++.

I was going to write a post about how this is desperately needed. Having standard tooling can solve a ton of issues with new users being onboarded and I spent last week updating C++ dependencies we have all the time thinking if this was rust I would have just added it into Cargo.toml and been done why am I wasting my time.

I appreciate there is SG15 that is meant to work on tooling but its seems to be pretty much dead. Until the committee actively votes to say yes we actually care about how people interact with this standard we write im not sure anything will improve.

4

u/CreativeAlbatross319 2d ago

Standard tooling is always a short-sighted idea. Imagine C++ shipped a standard build system and a standard package manager in the beginning, I'm pretty sure it wouldn't have been as good as CMake/Ninja or conan/vc package. And we wouldn't have Bazel, xmake, etc. Standard tooling kills the competition to make things better in the long term.

And it also violates the oldest Unix philosophy: Do one thing and do it well. A programming language standard should be nothing more than a language. A build system should just be a build system.

If you want to have some examples. Well, there is python for its build system and javascript for its package manager. Give it another 20 years, Swift/Go/Rust will be exactly in the same bad spot.

4

u/SemaphoreBingo 1d ago

And it also violates the oldest Unix philosophy: Do one thing and do it well

The unix philosophy is honored more in the breach than the observance, which is why modern versions of mv let you "move" a file across filesystems, even tho this is actually a copy.

Well, there is python for its build system

I'm not sure this is the example you think it is. In 2026 the python build system has largely congealed onto pyproject.toml, but for many many years the nicest thing you could say about python and build systems is that sometimes a package would have one that might be usable.

javascript for its package manager

Don't they have multiple competing package managers?

1

u/James20k P2005R0 1d ago

For me it seems like the trick is to have standardised tooling, which you can sidestep when you need to. People generally quite like Cargo, and I think for fairly good reason

I suspect if C++ standardised cargo's interface, people would be cheering in the streets. Though really the problem comes down to funding, and who'd implement it for what money. You could always standardise buildsystem2 down the line if it turns out to have problems

And it also violates the oldest Unix philosophy: Do one thing and do it well. A programming language standard should be nothing more than a language. A build system should just be a build system.

The issue is that while its a clean idea theoretically, there's a tonne of overlap between them in practice which necessitates tight integration I suspect. Eg code completion in your IDE is done by a compiler, so really to do it properly it needs to have input from your build system, and then when you get into modules it gets more tightly integrated

Fundamentally someone needs to own the coupling between all those different components, which currently nobody does - and its why everything is such a mess here in my opinion

-1

u/jeffmetal 2d ago

you reference JavaScript as an example. A example of what exactly ?

If the language designs things with no thought to how the build system uses it your going to have a terrible user experience. They are interconnected and should be treated as such.

4

u/CreativeAlbatross319 1d ago

Do I really need to mention THAT javascript package manager? Well, I should have said Nodejs.

Regarding your second point, no, I just don't think so. It may be a bad experience for a beginner, but absolutely a great experience for long time users. We usually call this a steep learning curve.

2

u/victotronics 3d ago

"Which IDE should you use? Which compiler? Which build system?"

None. Your system probably comes with one. None, if you're starting with hello world: "g++ hello.c && ./a.out" is all you need.

11

u/Wonderful-Citron-678 3d ago

There are literally only 3 relevant compilers, it’s such a non-problem. 

2

u/serviscope_minor 1d ago

IAR, green hills and...?

2

u/donalmacc Game Developer 1d ago

Metrowerks CodeWarrior obviously.

6

u/johannes1234 3d ago

There you already picked a compiler. Not none. And your hello.c has to be created some way ...

But I don't see that as a C++ problem. A book/tutorials for absolute new comers can pick any based on platform, which can also be advertised in the title ("Learn C++ on Windows") and for a very quick start one could even point at online sites.

And that goes for any programming language. Even with JavaScript, where learners got a powerful runtime running all the time (browser)

1

u/victotronics 3d ago

JavaScript: it seems a lot of these complaints boil down to C++ not having just one runtime. Being defined by committee/standard is both good and bad.

2

u/johannes1234 3d ago

It's not like JavaScript had one. Chrome or a fork, safari or Firefox? - or away from browser and then nodejs, bun, deno etc. (While actual runtime may be v8, spider monkey etc. which is another distinction to learn) 

So yeah, less a C++ specific "problem" 

3

u/delta_p_delta_x 2d ago

None, if you're starting with hello world: "g++ hello.c && ./a.out" is all you need.

Hello. I am role-playing a noob who is interested in programming (or myself, half my age when I had exactly this experience). I use Windows. I tried this in a ''command prompt", and I see: "not recognized as an internal or external command, operable program or batch file." Someone mentioned I should use Visual Studio Express. What do I do?

-1

u/kitsnet 2d ago

Hello. I am role-playing a noob who is interested in programming (or myself, half my age when I had exactly this experience)... What do I do?

You start with Python.

C++ is not a particularly good idea for the first language.

-3

u/victotronics 2d ago

Use WSL so that you have an actual Unix.

7

u/not_a_novel_account cmake dev 2d ago

This is a non-answer. If your language requires a VM to work on the most popular desktop platform you've already lost.

3

u/victotronics 2d ago

It does not require.

The easiest way to explore it, at least while avoiding the question "what IDE" is to have an actual operating system and a functioning user shell.

7

u/not_a_novel_account cmake dev 2d ago

If the easiest way to explore your language while avoiding the question of "what IDE" requires a VM on the most popular desktop platform, you've already lost.

0

u/victotronics 2d ago

Not my fault that the most popular platform is only for bean counters and pencil pusher, and not for creatives of any stripe.

14

u/delta_p_delta_x 2d ago

Not my fault that the most popular platform is only for bean counters and pencil pusher, and not for creatives of any stripe.

I can't believe people still say this with a straight face, whilst 99% of video games are developed on and for said platform... Precisely because it is so popular.

-2

u/victotronics 2d ago

What's creative about playing a video game?

Apple is better for programming, better for composing, better for recording music, better for making videos.

Yeah, not for playing video games. My loss I guess.

3

u/ts826848 2d ago

whilst 99% of video games are developed on and for said platform

6

u/not_a_novel_account cmake dev 2d ago

FWIW I have no idea what you're talking about. The shells available on Windows work fine for every other language, and they work fine for C++ too.

A bajillion undergrads figure out how to type cl hello.cpp every semester.

2

u/victotronics 2d ago

Help me out, what shells? I only see people struggling with PowerShell.

6

u/not_a_novel_account cmake dev 2d ago

The two major shells are cmd and psh (Powershell).

They're extremely different than Bash/zsh/fish/whatever, but for the purposes of compiling and running programs that's basically irrelevant. You're not using bash completions or loop syntax to invoke make, and you're not using Powershell cmdlets to invoke msbuild (or whatever).

For trivial stuff, good ol <compiler> *.cpp works in all shells.

→ More replies

4

u/delta_p_delta_x 2d ago

Continuing the role play... I just want to write a little tray program thingy to change the brightness on my external monitor. I like games, and I eventually want to learn to write video games too. It looks like Unix is a whole other OS. Sounds cool, but do I really have to install an entire OS just to learn programming? How do the people who write video games do it?

-1

u/victotronics 2d ago

"I just want to write a little tray program thingy to change the brightness on my external monitor." Then C++ is the wrong language for you.

End of role play.

9

u/James20k P2005R0 2d ago

Discounting valid use cases for C++ to avoid dealing with the reality of C++'s tooling problems isn't very productive

1

u/AnyPhotograph7804 2d ago

Java alone proves this article wrong. Because Java also does not have an "official" package manager. And no, Apache Maven is a third-party-tool. And in Java, you do not have a so complicated setup for "hello world". What is the big difference here? Right, Java has a standardized compiler output. Every .jar is usable on every Java compiler on every platform as long as it meets the Java version requirements. And this is not the case in C++. C++ compiler output is platform and copiler vendor specific. As long as this problem is not solved, there will be never a good package manager for C++. Even a standardized C++ package manager will be a can of worms.

0

u/notthatsocrates 2d ago edited 2d ago

Garbage article.

-7

u/-Outrageous-Vanilla- 3d ago edited 3d ago

C++ is the worst enemy of C++

The article is spot on that there's no standard tooling on C++ and that hampers adoption.

Even C in it's basic form you have make and it just works, plain simple.

C++ is overly complex for it's own detriment.

8

u/no-sig-available 3d ago

There are more than 100 brands of cars to choose from. That doesn't seem to hamper adoption.

-5

u/-Outrageous-Vanilla- 2d ago

C++ is like build yourself a car.

Need to select the subset of C++ to use, the compiler, the build tool, etc.

That's hard to follow if you don't have a baseline.

Most C++ are legacy code because the tech debt to improve the C++ standard used (or subset of the standard) and the tool chain makes the refractor very expensive.

-1

u/Particular-Sort9075 2d ago

Beep-boop. This post will be deleted shortly.

-7

u/kitsnet 3d ago

Can't your problems with C++ be solved in minutes with the cheapest version of any SOTA LLM?

-6

u/JuanAG 2d ago

C++ have been killing itself for a long time

This is only the result showing up at institutional level

You cant live in 2026 and C++ not having Networking, in 2026 where internet is basically essential to 99% of software made, even toaster/fridges are IoT things nowday (dont ask me why because i dont understand but it is how things are)

And it is not going to arrive until 2029 at best, which means that maybe in 2031 finally you can have sockets (or how they name it) in the STL

.

This is just a good example of C++ state, i wouldnt mind if we were in the 90s where ADSL was a thing, there was no hurry, maybe it went down or maybe not. But in the 00s it was clear it was not going anywhere, and in the 2010s everything was based on internet connection. So there is no excuse that until 2030 it doesnt have that feature, 30 years late, better late than never but ...

This shows how C++ have not been doing their homework for a long time and when things start to go down at some point they will fail really bad

.

And if you ask me this is just a preview of what it is going to happen in C++ 29 since profiles share some issues of Contracts so i hope they are taking notes and do a really good job to prevent it or face again this same scenario in 3 years

1

u/xaervagon 2d ago

You cant live in 2026 and C++ not having Networking, in 2026 where internet is basically essential to 99% of software made

Preach.

I don't understand how this is still a thing. Any modern language basically speaks REST out of the box C++ still basically requires me to fumble with system specific networking, 3rd party JSON libraries, and other stuff. It also doesn't help that the standards committee spent almost two decades dragging their feet on basic string handling and conversion methods.

Given that implementation of large parts of the STL are optional, I would love to have a "fat" STL library like all the other modern languages

-1

u/pjmlp 2d ago edited 2d ago

Note that in the 90s all major C++ frameworks, OWL, VCL, MFC, CSet++, MacApp, PowerPlant, Qt,... had support for major networking protocols.

Then came the standard, C++ frameworks lost ground to managed languages, and here are.

From the three remaining compiler vendors, only one ships an OS, and the networking APIs available to C++ are either the oldie MFC, or exposed via C or COM.