369 points · by simonask · 3d ago · 413 comments
What makes this worse in finance is that you sometimes only get a binary library to link against so you have to add another 2 days to run the library in a subprocess with some kind of rpc interface on top because it's not link compatible.
I can't speak to the standardization saga but IMHO that really feels like they are arguing over areas that ultimately should be in libraries and where the exact details don't matter that much. There are interesting areas like verification (rust verus e.g.) where c++ contracts might help but by the time I'm getting value from that years will have passed when I can have 3 different tools right now in rust.
c++ has the weight of history and many large projects like llvm etc I can really tell the dam finally broke. I am currently interviewing and number of companies now have or are starting rust teams to replace their internal c++.
I think the author thinks it's possible for c++ to catch up but IMHO it's too late for that now. There are too many people like me who have burnt years on c++ and don't really want to go back.
> I can't speak to the standardization saga but IMHO that really feels like they are arguing over areas that ultimately should be in libraries and where the exact details don't matter that much.
The string_view issue is directly related to the lack of common functionality in the standard library. Holes like that deeply damage the ability for libraries to interoperate.
What made me like C++, coming from Turbo Pascal, was the mix of Borland IDEs, the C++ frameworks, and how to have something closer to Smalltalk ideas, while having performance and being at home in UNIX environments without having to deal with the usual C issues.
Frameworks like OWL, CSet++, VCL, show how to have a .NET/Java like productivity, years before they were invented, while using C++.
However that isn't where the hardcode community wants to be, thus those of us that care find home elsewhere.
Additionally, AI agents make the desire to control every bit on application executable now seem out of place.
It's a heavy burden. On the road to mastery, every apprentice developer must learn to manage the flaws of the tool chain and language.
(Also, let's not have "you just have to master the toolchain" and "every language has its flaws" stand in the way of making a better toolchain)
The hours I've spent in CMake trying to get an instance of Abseil to play nice with an instance of Protobuf (which uses Abseil), an instance of gRPC (which uses Protobuf), and an instance of LibTorch (which uses Protobuf)... To this day, I don't know if my CMake was bad or if theirs was. Maybe both.
That's one of the points made by TFA: cmake sucks and is annoying, and every library seems to use it, so by and large people are choosing to use something else. The something else they're choosing, however, is a different programming language with better build and packaging ergonomics.
Ive had cmake problems that werent fixed by a clean and rebuild, or a nuke of the entire cmakecache, but instead by re-cloning the entire project. it make no sense.
I once couldn't get latest - 4 CMake to find OpenGL on Ubuntu latest - 2. Not latest stuff granted, but OpenGL's location on Linux is pretty clear-cut - I checked the CMake built-in stuff to find it and it all looked fine, but no luck, so I just hard-coded an extra path.
If you ran git clean -fdx (careful, this nukes everything untracked in your tree) that would have fixed the build.
Then next step would be to find that bad cmakelist and make it store the generated file in the build directory so it wouldn't interfere with the build.
Incoming: Rust allocators, std::random, std::simd, ByteStr, ByteString, zerocopy (longer term)
Rust just moves far faster than C++ standardization.
And you really try to make it sound as if having those libraries in stdlib is something extremely special. It is not. Two different trade-offs. One just needs to pick one that suits themselves more.
So is std::mdspan - another well-designed abstraction. (Just wish it did more like NumPy-style broadcasting or array expressions, but probably asking for too much)
std::locale has poor antiquated design (even when it was introduced!) and inadequate Unicode support. Nobody uses it.
std::random - very poor. No guaranteed cryptographically secure random-number generator. Outperformed by most implementations. And a bunch of other issues that I don't quite recall now. (seeding, etc))
std::regex - the biggest and saddest joke of the programming world, even when it came out! Beaten by the slowest, interpreted languages. A high-schooler could write a more performant library even without AI support. Feels like it got approved when someone was on a bender.
(std::simd - can't really comment, since I am yet to personally use the shiny C++ 26 feature. However, some people hate it https://lucisqr.substack.com/p/c26-shipped-a-simd-library-no...)
This is why C++ desperately needs a deprecation and "mythical-ABI break" release, where the only thing that happens is that legacy features are removed and fixes are made..
Now Abseil is a kind of loopy rabbit hole, as well.
At least C++ will trap AGI. No way to escape.
AI makes it easier to write new code in Rust, easier to rewrite old code from C++, and easier to exploit C++ code.
There's no way back for the language, inertia will carry it for the next 10+ years but its eventual irrelevance is a certainty.
LLMs are quite good at hand-written assembly though, so my C++ library still has a large lead for platforms where that work is done. I can probably port that to Rust as well, but I did start out with forbid(unsafe).
The Rust version is currently middle of the pack. But it's in my view a success. The trick to getting good performance with tailcall dispatch in Rust is keeping the argument list low enough to fit in the calling convention, on stable. For nightly the "become" keyword is faster as I can put a few things in the stack frame to speed things up even more.
I'm not sure how to improve the Rust performance anymore than this, other than trying to go for cheap wins in the bytecodes themselves. The only big lever left is hand-written assembly, which I may have mentioned exists in the C++ version, hence the outrageous performance.
> …it was completely painless and ~same performance. LLMs found a swathe of issues that I ended up porting back as well.
It's a language I know, and I'm unlikely to learn ins and outs of Rust with LLMs around, neither are other devs stitching to Rust either I reckon.
In this scenario I really don't see a compelling argument to switch.
It's true the compile times are often higher, but if you split crates aggressively and only use release builds when you really need to, the difference isn't that big.
I don't see much need for Rust in a world where LLMs are significantly better at avoiding C++ footguns than humans have proven to be. It's fine but no longer mandatory for safe/secure coding. A C++ programmer who doesn't already know Rust probably won't need to.
We have some of our country's most powerful supercomputers, and the people supervising them don't know any Fortran. Last century's Fortran books from their predecessors are still here, but "My Fortran doesn't work" is going to get you the same odd stares as "Why can't I pay with farthings?" or other stuff that hasn't made sense for decades. [The farthing is about £0.001 and thus it was already basically worthless when it was formally demonetized in 1961]
The machine already knows the CPP core guidelines better than any human, so you won't be able to drop in on a project as a consultant just from knowing the language well.
There's a project I once worked on that would be unfeasible to rewrite because there is so much unwritten about how it should perform - there are too many features and targets to test exhaustively. But that company already did layoffs pre-AI, because it already didn't take many devs with domain knowledge to keep it ticking. That project won't demand much language support and an industry of these projects won't be desirable to work in.
We’ve seen recent examples of fairly rapid complete rewrites into other languages using AI. That’s only going to get better.
Rust isn’t a panacea but it solves a class of critical problems around memory safety and concurrency. AI has made those factors even more important. At the same time AI makes Rust easier to write, which has always been an issue.
I just vibe coded a video processor in c++. it got really great performance compared to a commercially available thing in C#. I had hoped to be able to port it to rust for safety. No matter what I did it was always a 10-15% penalty. I settled on running TSAN and ASAN as part of the testing cycle.
The surrounding UI can definitely be rust, but as far as the hot paths for moving frames around, no.
I find that surprising, since ultimately Rust uses LLVM to emit machine code, same as a lot of C++. Do you have links to benchmarks? (Not asking to be a sea lion, just genuinely interested and I'd like to learn more about how or why that'd be.)
it's very close, but c++ still seems to have an edge.
There is also C++ Builder, however VCL and Firemonkey are actually implemented in Delphi.
Now if you mean Qt, yeah that is right.
Do you have good data on that?
The game industry is huge and, yes, many tentpole AAA games are written in C++. But there are a lot of games written in Unity and C# or other languages. I would be very interested to see what the relative breakdown looks like of where gamer dollars are going into which games by programming language.
You can also mix things up. I had OpenGL for the login screen for a while, and Vulkan for in-game. No particular reason other than a transition.
Just saying. C++ will soon have no moat in video games anymore.
Anders has created or built four programming languages in less time than Bjarne has been Sunk Costing his one and I wonder sometimes where we would be if he had given up and started over.
You can rewrite but that is very different
And yes I have seen the OS projects that did a port by having six developers spend triple their usual time on the project for a year...
But, what ABI precisely ? There is nothing a consumer can truly depend on since it is never truly defined. All libraries which truly offer ABI compatibility as a contract just leverage the C ABI.
C++ committee should have permitted their "mythical C++ ABI that exists but not really" to break across odd standard releases (once every 6 years) so to fix severe and glaring deficiencies in the standard library. This was done so successfully in the past and compiler vendors had no issues doing so. But in the last decade, the C++ committee has sadly gotten ossified and even tyrannical.
MANY prominent developers and committee contributors have walked away from the C++ standardization process (WG21) or pivoted away from C++ altogether after their major proposals were rejected or stalled. Most of them have moved away from C++.
And Rust will now rule the roost while C++ slowly petrifies and dies.
"Rubigina in pace, C++"
1. ABI differences between compilers - or even compiler version - for the same functions or data structures.
This is not so much an issue on modern platforms. Unix platforms generally use the Itanium ABI. MSVC uses the x64 ABI. You only have a problem if you're mixing MSVC and GCC/Clang binaries on Windows. (It's possible, but you need to follow the COM guidelines.)
2. ABI differences between libraries or library versions.
std::string, for example, has different members or data layout in every C++ standard library (GCC's libstdc++, Clang's libc++, Microsoft STL, etc.) That's why they are not binary compatible, even if you would compile them with the same compiler.
If a library changes the members or layout of one of its library types, that would be an ABI break within the library. This has nothing to do with the C++ ABI.
---
When the C++ standard people talk about ABI breaks, they typically mean the second kind.
That being said, I generally agree with you! It's ridiculous that the layout of library types - which often dictates the implementation - shall be set in stone once and for all, with no possibilities for future improvements.
As you said, there have been ABI breaks in the past, most notably between C++98 and C++11. Some things just need to be fixed. We shouldn't be held hostage by people who are forced to use ancient prebuilt binaries where the source code has been lost or the vendor has gone bancrupt. If they can't rebuild their libraries, they can put them in a separate component, possible behind a C interface.
It's always been like that. The ability to use a win32 gcc-compiled .dll and a MSVC-compiled .dll was something that was decided upon by the compiler devs not dictated by a standard. And even then not actually guaranteed - plenty of options or attributes to change that in incompatible way. And make sure you link agains the same windows CRT - hope you don't mix ucrt and msvcrt.
This used to be a much bigger problem, but it really isn't today.
If anything, the concept of caring about the programming language something is implemented in might be dying.
So while it isn't dying per se, it isn't the scale that used to keep The C/C++ User Journal's articles going.
My personal view is APIs and behaviours should be standardized, not libraries. In that respect C++s efforts to figure out universal async I/O is a noble one unmatched by other languages. And it's a hard problem.
That's not to say it hasn't gone off the rails. The Sender-Receiver model has never 'clicked' for me. I think the ideas is alien and overly abstract and I've never seen anything elegant fall out of it on a single page. Coroutines on the other hand make sense. The C++ language implementation of them is elegant and versatile.
std::execution is a verbose mess.
At my employer pretty much all of our code is C++ and threads aren't used anywhere. As a result, I/O tends to go through our own APIs written to use an Linux ioring backend behind C++ coroutines, which yield to our own main event loop.
So char always means "byte" and never a real character. I don't think many C programs will work well if char is a 32 bit type so it supports full unicode.
int8_t came way too late and has a way too long name. It should be i8 or int8. There is a problem when C is more verbose than Java. Also: why did it take so long to get a boolean type and fix the "bools are ints" design mistake.
Lack of standard libraries and module system is just another layer of not wanting to standardize things.
That's not really how unicode support works. It can be useful to have a specific type for storing unicode code points (like Go's 'rune' type), but strings are generally UTF-8 encoded these days, so having a wide char type plays at most a marginal role in a language's unicode support.
E.g. in Java a char is 16 bit while strings are encoded as 8 bit or 16 bit. (If the string only contains Latin1 chars, it will use 8 bit encoding to save memory).
The char type should be what you use while looking at a single decoded character (e.g. when parsing text files), not how you encode it in a string.
In practice it's bad, a generator (co_yield) is often an encapsulated object that will have a non-deterministic lifetime, thus it cannot be put into a fifo.
"Tasks" however (co_await / co_return) often live on a stack-fifo that could've been mixed with partial bump-allocators to allow pointer-stability for the stack-frame (there is kind of the machinery via the new overloading for the promise), but due to varying lifetimes it easily becomes a mess (Looked at some other task library that seemingly had low allocations like this but it feels like the entire machinery can easily break with "careless" usage).
And I think that's a part of why std::execution feels like a mess, it tries to make coroutines in task settings more "usable" for those writing things around tasks, but it doesn't really decide on a coherent direction for tasks (since the language primitive was left too abstract/messy).
It's also not at clear to me why you'd want to put a generator into a fifo. Any succinct code snippets that demonstrate the issue?
> there is kind of the machinery via the new overloading for the promise
Any details?
See under the topic dynamic allocation, https://cppreference.com/cpp/language/coroutines
Correct but I'd argue almost nobody builds desktop applications in C anymore and the places where C is the most common (embedded) they built full on frameworks including package managers around them.
If you write any daemon that uses jsonrpc for example you immediately pull in 100k+ loc of dependencies just to get off the ground (json via nlohmann, a webserver, ser/de library possible etc) while for an embedded application a lot of projects itself are smaller than just the dependencies most C++ projects desktop have.
C++ competes with Rust. C doesn't.
You can have all the standardization in the world but if you can't trivially swap one implementation for another then what's the point?
I also feel this is self fulfilling. If there's no simple way to pull in libraries then why worry about being compatible anyway? Every codebase has its own quirks and build setup and macros. Why not? There was no simple tool they broke by making those choices.
I feel like this is really a commentary on how young rust is as a language that this issue hasn't been important yet. It takes a long time to realize an API is a mistake.
Note that I said API not ABI above. ABI is a different category of problem.
C will make this obvious by stepping on your toes. C++ will help you along until it has enough leverage to break ‘em.
The package manager for C is whatever your distribution uses plus pkg-config. The standard library is the C standard stuff plus POSIX.
I rather love C, Perl, Python with how easy it is to fit them in any context by manipulating flags and environment variables. It's way better than Go which you have to coerce to not go online and Node.js/npm with its complicated mechanism. People talk about conflict between projects, but system packages works fine before, and you can always use containers and vms to isolate two infrastructures. Also such conflicts is always brought up by the libraries developers who break API contracts happily.
But then, if I want to develop something for Python, I need to reach for a totally different package manager that lives in its own universe and barely integrates with my existing package manager. Then, for Rust, same thing, totally different package manager, totally outside of my OS.
Having multiple package managers on a system is an anti-pattern as far as I'm concerned.
There is, its called Linux kernel, along with whatever package manager used to download the headers and shared libraries.
This article kinda sums up all frustrations I have with C++. Vcpkg seemed like a good fix at the time, but it needs so much more improvement and adoption.
A lot of good solutions to the raised issues in the article require us to rip the bandaid off, however I believe the community built around C++ has built their systems around the premise that it must remain stable and predictable.
Anyway I don't understand the aversion to just using submodules. What we need is a decent standard build system, not a package manager. We have CMake which is wide-spread but garbage, and we have Meson which is pretty good but not as widely adopted. If every library had a meson.build file I'd be mostly happy with just having submodules to them in my subprojects/ dir.
The reason is highlighted in the article: Submodules break down catastrophically for shared transitive dependencies, which means that you can't have shared "vocabulary" types outside of the standard library.
As a significant bonus, this makes the transitive dependencies very visible and provides ecosystem pressure for libraries to reduce their number of dependencies. This is a good thing. Other package management schemes make it a bit too easy to ignore transitive dependencies in my book.
vcpkg is certainly created and maintained by Microsoft.
But it is not for Visual C++. Visual Studio build tools is supported, and it's the default (but not only option) on Windows. But it supports other platforms and build tools too.
If it works for you use it. Just because meson looks very usable to you, it does not mean others have to adopt its opinionated bullshit and irrelevant approach.
Meson and Cmake are both there to solve user's problem, not expose users to all their dirty laundry dressed up as 'design approach'. Since both have their bullshit buckets full, it just depends on user's familiarity and personal preferences.
I dislike Cmake, and many years ago I watched videos of Pakkanen about build system design, and was impressed on what the video was conveying meson could do. Then I tried to implement meson on a firmware project. The project was still evolving, and the kind of babysitting and project reorg I had to do to pacify meson was more than the language bullshit that I had to deal with cmake. cmake has generator expressions and interfaces, so one could easily build for say stm32 and posix target with the same project tree. meson, if i remember, does not allow such config.
Long story short, went back to cmake, and with llm it is not even an issue. meson would be a non issue with llm too, but what surprised me the most was the theory of the videos by Pakkanen and the impl bullshit one had to deal with Meson on twisting the project into meson's well-of-wisdom. That might be one of the reasons why nobody adopts meson.
These are the same thing and the more you reject it the more you suffer
In JavaScript, NPM is a package manager. Build systems (Vite, Webpack, Browserify, ...) are separate.
In C++, we have vcpkg and Conan. Both are package managers, neither are build systems. I haven't used vcpkg but at least Conan integrates with Meson, CMake and other build systems.
A good build system (i.e not Make) has a clean concept of what a "package" is and how the dependencies between "packages" work. But a build system does not need to know how to download packages, it just needs to know what to do about them once it's pointed at a package. The problem with Conan is that it has to support a bunch of different build systems, so the definition of what a "package" is gets muddied.
Having said that, homebrew also works on Linux, etc. It doesn't make it a solution even remotely. Like, using homebrew on Linux or vcpkg on non-windows sounds like a winning combination of flaws conveniently packaged.
Note that Clion does exactly this for vcpkg.
I wonder how long many of these will last.
AI is absolutely a predator to C++ not a benefit as the author notes, at least in my untrained eyes. Any language that gives you consistent “pythonic” standards and compile time “if it compiles it runs” guarantees (or tries to) seems to perform VASTLY better with AI than the ones that can’t.
C++ has, as an outsider who’s talked to C/C++ coders and written less than 1000 lines, felt like it decided “yeah but if you want fast on bare metal you’ll put up with it” and left it there.
Rust was designed to come for that lunch and it sure seems like that time is upon us. I’ve no doubt that the most performant code may still be theirs, but if it’s not on a rocket it’s probably going to be Rust not C++ sooner than later.
With that in mind I’m extremely curious how much longer it’ll be the standard for games. Yes if you want cutting edge graphics and physics you’re going to be managing your memory and might as well go deep, but as more and more of my backlog looks like Probably Stolen or say more “demanding” Caves of Qud or Nuclear Option i wonder where that line starts to blur.
Given the whole “shipping” goal I don’t see the next generation reaching for something so “hostile” when good enough and easy to work with get the job done and don’t have “must trade every nano second” needs
but it really doesn't matter since it's such a niche area. Rust doesn't need to take these over, there's really no any need to
but the vast majority of old C++ was simply general purpose stuff like web servers/backends/databases etc. and now it's more of a liability to use it, especially for a backend with untrusted clients interacting with it
for games, probably it'll be hidden behind FFI, like a lot of it already is like in the ML space
compile times, code/codebase size, and obviously the observables in the final product (memory usage and runtime performance, security) will matter. but the actual code is next to irrelevant, assuming that AI can work with any language at about the same level.
rust still loses on all of these except security. it doesnt matter if in practice rust only loses by 0.5% on perf because the core libraries everyone uses just aren't optimized enough - as long as that changes, certain applications (e.g. those that dont care about the built in compile time security and are happy to fix it up in cpp with AI loops), those projects wont switch to rust.
compile times are especially horrendous btw. hard to think someone came up with a language that takes even longer to compile and iterate on than cpp .
But I expect Rust or something else will make substantial inroads. I think a big part of C++'s dominance is just inertia.
So Nim?! ;) At least my AI agents seem to be able to build very quickly with Nim. The performance is generally on par with c++/rust. Though Nim sits much closer to the if it compiles it runs side of things.
I had Claude literally one shot a GUI demo app in Nim the other day. It compiled and ran like a charm first try! I was pretty happy with that.
Theres advantages that C++ has over rust still with const exprs and template specialization, which Nim shares as well. IMHO, thats the sweet spot. Rust might get there one day.
Pretty much anything that fits the pattern though seems to do quite well and I suspect AI will help these languages.
Of course that's before crushing them because "why in the hell would i use <niche lang>" when the AI can just pick something from the common toolkit like rust/TS/python.
I am curious if someone is going to use an LLM to take 2 something at assembly level and get as close to bare metal as possible but still with guarantees, or something like that.
Then again I'm the moron who figured I'd do AoC this year in Uiua so you know, grain of salt.
That does seem to be a common thought for many folks. :/
For myself it reinforces my rationale for <nice lang>, in particular Nim, based on the properties it brings to the equation.
Whereas sticking to rust/TS/python or whatnot constrains the properties of the resulting software. To a degree at least.
As in TS/Python might be fast to iterate on, but you also need many more tests and the performance is going to be limited. Rust will be fast generally, but dealing with lifetimes and its type system limitations will be more work for the agents.
I want the properties of the language I'm using to match the properties I want in my software! E.g. readable, fast, flexible, correct, etc.
> I am curious if someone is going to use an LLM to take 2 something at assembly level and get as close to bare metal as possible but still with guarantees, or something like that.
Wasn't there a project that used Claude to make a whole OS in assembly lol? Sill I doubt it'll be popular.
Incidental complexity adds up. Hiding things like the details of what instructions need working around or perform best, etc. Better to use suitable specific languages at each level IMO. Languages at that level are a form of crystalized intelligence.
Until it is fully bootstraped, it can't fully replace it.
Note that LLVM and GCC are the few projects that have a similar level of contributions as the Linux kernel.
As user of managed languges whose runtimes have enough C++ under the hood, I am perfectly aware that as much as I would like them to be fully bootstraped it will never going to happen for various kinds of reasons, not really technical ones, rather economic, human, historical baggage kind of stuff.
Which doesn't seem to be the case every time we get those RIR advocacy posts, and that gets tiresome on the audience.
No it won't. It will bury inefficient languages and raise only those modernly designed for token optimization. Rust isn't either but it is the closest. Ask any LLM and it will explain all the parsing pitfalls of Rust and how to improve it. It baffles me why no big tech is working on a new language for the AI era specifically tailored for LLMs
There will be one and only one, but it hasn't been developed yet. Throw a whole week, some billions of tokens and you would get the perfect language for LLMs
Isn't this defined also by training data? That is, the LLMs and their datasets are designed around the language rather than the other way around.
DIL is way more comprehensive than you'd guess. I'd say its roughly comparable to React + JavaScript. You can find discussions of how it works online, but the easiest way to learn about the language is to just ask ChatGPT to explain it to you. It's not shy about talking about it.
Nevertheless, OpenAI hasn't published a standard or any documentation it. That's interesting for two reasons. First, it means they don't expect humans to ever read or review DIL code directly; that is, they expect it to only be generated by their LLM. In that sense, its a language designed solely to be used by AI.
The second reason is even more interesting but perhaps harder to appreciate. How did GPT learn DIL? Not from scraping the internet, reading textbooks, or reading github projects. There are no references to the language anywhere in the public corpus. That's really weird, because the general advice is to stick to languages like Rust, Python, or JavaScript that are well-represented in the public corpus, and to expect a degradation in performance if you have the LLM generate less mainstream languages. How could OpenAI be so confident that GPT is so good at writing DIL that they trust it to one-shot complex components with near 100% reliability?
The answer, of course, is that the advice to stick to well-represented languages only applies to us plebs, who have no access to the GPT training data or tooling. Because it's an OpenAI internal project, they could add as many DIL examples to their training data as needed. Where did those examples come from? Where do you find a million lines of code for a language that does not exist? Not from humans, that's for sure. The most likely scenario is that they fed GPT itself a language spec, gave it a parsing tool, and had it generate its own training examples. On top of that, its probable that they use constrained generation (the same technique that ensures that it produces valid JSON for structured output) to ensure that it always generates syntactically valid DIL code.
Taking it one step further, since we're already speculating - do you really think the engineers at OpenAI really sat down to typed out a detailed language spec? Or do you think they just had GPT generate that too?
So, although the whole thing is shrouded behind a veil of proprietary secrecy, I think it's likely that DIL is the first really serious example of a language designed by and for AI, with humans not invited to the party.
Many would argue it even stands in the way.
The standard is also very difficult to understand.
Standardisation didn’t work as might have been hoped.
When I started learning Rust in 2017 in my spare time (not working in VFX any more), I recall having exactly the thoughts put down in this article.
It starkly reminded me of a friend who switched from Maya to Houdini and at the time said: "All these years wasted with Maya". (@danwills on HN).
When I read the article I just thought: the author suffered almost another decade after I had this insight. Because they had "avoided" (quote) looking at Rust.
In my "what if?" file of hypotheticals, I wonder what would have happened if C++ had gone all in on a Cargo-like dependency manager. Ruffled feathers, pissed people off. As the blogger points out, a lot of committee time spent on `std::` additions could have been avoided if dependency management was easy.
The long-term risk for C++ is becoming a maintenance language like Fortran. That happens when it's no longer a viable choice for big, new projects. I think C++ is getting close to that line, and has crossed it in several domains. Unfortunately the people making those greenfield decisions – new programmers, startups, entrepreneurs – are not at the table in C++ decisions so they tend to be forgotten.
The other problem with trying to standardise a whole package management system in C++ is that there are multiple compilers, build systems, and implementations of the standard library - which all affect the ABI.
It might be easier to standardise the things around a package manager such a universal package specification format to make it easier to distribute libraries, or a new standard library core library with just enough vocabulary types and concepts to provide a consistent ABI for compiled libraries. Then let vendors provide the package managers so that each one can find their own niche.
c/c++ still has a niche in embedded systems where bits still matter.
and before someone screams 'but you can do rust!', yeah i know. its still not there yet. vendors arent supporting it, and its not trickling down. it's still very 'bleeding edge'.
I remember that for a long time a lot of Rust projects required the nightly compiler, and it put me off Rust for a long time, but a lot of those features came into the fold and now Rust is very well defined.
Similar story with Clang, though CBA to find exact dates/versions.
The -std=c++XY flags are added after the previous version is released and the new version's target date is known. The actual features are tracked in pages like https://clang.llvm.org/cxx_status.html, with the new features being added to the lists after they're voted into the standard. Implementation work only begins after standard inclusion, and this is a very deliberate choice (compiler vendors don't want to chase a moving target for implementation details).
The status page you linked shows that a lot of C++26 features - which still isn't finalized to this day BTW - have been implemented in Clang 17, 18 and 19 released in 2023 and 2024.
So either way, C++ compilers are just as willing to add experimental features as Rust, or equivalently, Rust is just as unwilling as C++.
there's no law that clang, gcc, msvc must only implement official released C++ standard feature
All of this makes riding the hoards of agents/AI tools on top of a rust project feasible and yields usable results.
Now this type of setup has to be driven with iron hands, specially with juniors around, or the project will end-up over-bloated with dependency that aren't `justified`. (definition of `justified` has to be owned too :)
> Networking programmers do not want to write thirty sender combinators; like developers in Python, TypeScript, C#, Swift, Kotlin, and Rust, they want to write co_await coroutines with ordinary for loops, if statements, and local variables.
I don't want to write `co_await` coroutines either! Google's fiber solution where it was all transparent without needing special compiler keywords you had to opt into was the best writing experience. It just required syscall wrapping / support on the runtime end.
Point out that nobody builds modern web backends, desktop shells, or MCP servers in C++, and someone always replies: “C++ is a general-purpose language - you can build all of those things in C++, and people have.” Some people have been to the moon, too. That does not make a Saturn V a commuter car.
Great quote. I love C++ like the author for full disclosures.Memory safety is low on the totem pole for usability. I mean sure, it would be nice to have, but it doesn't reduce development friction in a meaningful way.
Standardization around the distribution of libraries and build process would be a game changer for C++.
My preferred stack right now is cmake/vcpkg/Qt + vendored in libraries for anything else, in which I am super productive, once scaffolding is set up. This is not a "plug and play" solution at all.
In my experience, as C++ projects become bigger, less and less of the standard library is used. In that sense, some of the largest projects I work on basically just use the C standard library, concepts, smart pointers, vector, algorithms and not much else. No std::threads, no coroutines, no std::(unordered_)map, etc, etc. Why? Because I need extension points in almost all of these, and the standard library is very hard to customize mainly because it is not build as part of the project.
What if the standard library (the non-compiler dependent part) was just another library on github? Then we could split it up, make it composable, and VERSION IT. Put the interface behind std::v1, std::v2 or whatever to prevent source conflicts and we're off to the races. No more locked-in useless regex, std::list etc.
I don't even use the standard library (I compile as -ffreestanding) or any general purpose libraries at all, no generic containers or algorithms, everything is tightly generated and bespoke code, which makes it fast and simple. On Windows I don't include windows.h, I have the AI generate only the APIs and win32 types I actually use.
Having to do lots of grunt work to support multiple platforms? Not an issue, the AI churns through it.
C++26 reflection? serde? Who cares, AI can generate all the static type information tables and serialization code you need.
The only thing I offload to an actual third party dependency is crypto.
i suppose you can replace existing packages, but presumably they have sha protections. if not, it would seem local caches of the dependency tree would solve this.
The best research i know on the (admittedly understudied) subject is by Dan Luu: https://danluu.com/pl-tokens/ and subsequent articles.
In short, the EU regulation mandates that you need to maintain an SBoM to keep up with known vulnerabilities. Let's agree that is a sane thing to do.
Not all libraries are in Cargo. The best I could find is to give the Dockerfile that defines my dev environment to an AI to generate a SBoM stub. It saves time but it is not fully automated.
You're right that the missing package manager is a big issue for this env. lynkctl is our ci-cd solution for c/c++/embedded sbom generation, its a post-build solution which uses build artifacts for highly accurate sboms.
- Supports C++20 modules - Makes it easy to use the newest compiler - Basically just works because of hermeticity - Makes build script surgery easy if you actually have to do it - Comes with a built in package manager and registry - Supports distributed caching and remote builds, which CMake is now trying to do: https://www.kitware.com/cmake-fastbuild-distributed-cached-a... - Was made from the start to be modular and programming language-agnostic other programming languages, unlike CMake, which is now trying to add Rust support: https://gitlab.kitware.com/cmake/cmake/-/blob/master/Help/de...) - Most importantly, is already well adopted outside of C++ rather than being one more specialized tool you have to learn
Unfortunately CMake and its workarounds (header only, submodules, etc.) have been incredibly destructive and are a big contributor to the fear of changing/upgrading things we see with C++ users.
A customer I work with has seen dramatic speed ups moving from CMake to Bazel, and nowadays with AI you can automate CMake to Bazel migrations in a matter of minutes.
Slint is still not professional grade (tried it over a year ago, and also its lack of widget variety and graphics toolkit is a big hole).
Avalonia might work if performance and footprint is acceptable to the app, and I'm not sure about the breadth of their native OS hooks, and window manager quirks.
If your GUI is absolutely huge the maintenance costs may become painful, but for a reasonable-sized app it works really well in my experience.
Its faster than our old legacy win32 application, even if that might not mean much. We did have to implement our own bitmapped font rendering though :(
It seems to me like a logical next step to start engineering tools and languages for a world where we don't have people tinkering with code bases anymore. What matters when working with LLMs is fast tools, strong typing and safety, etc. You want fast feedback loops that catches/pre-empts a lot of issues. The cliche of a Rust program that compiles probably working as intended is one of the big reasons it works so well with LLMs. But modern languages also have a lot of the syntactic sugar that makes things nice for people (sometimes at the cost of adding ambiguity) that is less relevant for LLMs.
LLMs will probably keep getting faster, meaning the compiler might be holding the LLM back. Zigs focus on blazing fast compilation speeds and hot swapping could become a big advantage.
I think Rusts borrow checker will become a mistake. The right solution is to be able to plug into the compiler and add all kinds of static analysis depending on your needs. There is already a project to add memory lifetime checking which is more powerful than Rust in Zig. Limiting us to checking what can be declared in a function/type signature is a mistake.
The LLM can probably reliably figure out which kinds of static analysis needs to be done for a particular commit.
I think the focus Zig has on having a straightforward and explicit mapping from the code you see to the results/instructions you get can be an advantage for LLMs too.
Should be said he had a recent shift in stance w.r.t. LLM driven testingSource please?
I also think Rust remains meaningfully more "if it compiles it works". The compiler proving data-race freedom is meaningful.
This doesn't mean Rust is perfect for AI agents though, far from it. Mainly the compiler is too slow because of all the inference it does, inference that is less useful with AI writing the code. An alternative syntax for Rust that does less inference might be helpful.
With respect to RAM there's actually a glut heading our way, along with a GPU glut. The DRAM industry is cyclical and RAM shortages won't last, Jensen is panicking about the "avalanche" of GPUs he's ordered in the face of slowing demand. So picking Rust now because of a perceived RAM shortage is short sighted: you will be stuck with the Rust codebase for a long time, but not a lack of RAM. Of course you can always rewrite-it-out-of-Rust but even with AI that's expensive and slow compared to not doing it.
The nice thing about GC is it gives you the tradeoff. You can push the GC harder and your app will use less RAM, push it less hard and you use more but regain CPU time. Manually managed schemes have no such control - you always burn max CPU, all the time. It's especially a problem on highly concurrent systems where refcounting consumes lots of inter-core cache coherency bandwidth, and imposes a lot of unnecessary ordering.
I still disagree Rust is actually more meaningfully "if it compiles it works". It's true that it provides some thread safety checks in the type system, which is nice, but against that you have to balance the fact that:
• It provides no guarantees against memory leaks. Safe Rust can leak like a sieve and the compiler won't squeak. GCd programs are much less likely to leak, in my experience. This problem can quickly invert any perceived RAM savings anyway.
• The thread safety checks it does provide are fairly surface level. It only tries to protect against data races, but advocates often mix this up with protection against race conditions in general. You can still write race conditions in Rust and my experience has been that nearly all races I debug in Java/Kotlin codebases are logical app level races that wouldn't have been detected by Rust's type system.
It isn't flawless. Builds can take longer than one would wish, for one thing. But you can haul in a dependency with one line of CMake, use whatever FreeRTOS facilities you need to do whatever you need done, build, flash and it "just works." AI absolutely thrives in ESP-IDF.
All I know is that if non-embedded C++ worked like that, C++ would be in a much better place.
Its far less popular, or accepted in the C++ world, and there aren't many packages, and lots of stuff isn't really packaged.
I'm not going to argue its better than cargo. But afaict it does the job, and fixes what is the biggest achilles heel of c++, and does so without modules.
I do not want to fight with half baked alpha quality libraries and bindings.
Rewriting old apps into typescript, and downloading executables from random people on internet On every build, does not work for everyone.
> a strict TypeScript UI
Even article agrees Rust sucks in several cases, including GUI!
I had fond memories of Qt from back in my C++ days, but its Rust bindings are indeed poor alpha quality, and I suspect it will feel out-of-place forever. If they built a true QML engine natively in Rust I might check it out again, but juggling QML/JS <-> C++ <-> Rust will never become a happy flow, I’m afraid.
> Wiring axum, reqwest, serde, jsonschema, and rmcp takes 300 lines of idiomatic glue and compiles before lunch;
Ironically I have much higher expectations nowadays. When telling a model to make a hello world-tier project with some technology I expect it to add the dependencies compile and run in like 5 minutes tops
Or you could just use nixpkgs. Is there any particular reason you don't like it?
`patchelf` is the keyword that makes them fit into the nix store system.
C/C++ has many Windows (where Release / Debug are different build profiles for better or worse), Embedded and Console developers. All of the latter require not only platform support (Nix on Windows is recommended via WSL) and more or less support for programs/libraries to multi-target.
An local developer here in Stockholm did a deep dive with package managers a few years back and it was a depressing watch since only VcPkg seemed to particularly care about the multi-targeting (No idea if Nix handles this well? but it was eliminated due to not even supporting Windows) and a package manager looking to be even unofficial will have a hard time "winning" without filling both parts.
And I do recognize that while vc-pkg was best on paper in many ways, the GNU community would never adopt it.... and here we are still years later.
Personally at this point I think we should maybe just put a thin shim to make compilers/tools recognize git submodules officially and let those become packages because people won't agree on anything anyhow.
(Package managers video) https://www.youtube.com/watch?v=C1m-Uy4nuQA
but to he fair, the Windows story would really need to improve for this to be realistic---one would need to be able to build Windows native packages, not just WSL. even the OpenGL story is unsatisfactory when developing graphical apps to be distributed as binaries on Linux. these are sadly not easy to fix and it would require a company to really believe in the vision and drive these investments.
My impression cross compiling C/C++ works fairly well.
And yet people are reading what they want into it.
There are tons more code in C/C++ than most other languages and given its origins there is bound to be some difficulties since it started out with different assumptions i.e. the onus is on the programmer to put together everything. Since it is already being modernized (albeit slowly) i really don't see the hoopla around gloom and doom.
AI workflow is being optimized around tooling which is certainly better for other modern languages but in no way is it a hard limiting factor i.e. C++ will soon be made "AI-friendly" even though not standardized. If there is one thing i can say for the standards committee they do understand current sentiments/needs and do work towards making C++ better to fit in.
I’m curious why? What happened? Why is C++ so dysfunctional when other languages (Python, JavaScript) make progress?
It's always had a dependence on C that's caused tension between backwards compatibility and ease of use. Pre-C++11 file streams required a char* filename and .c_str() all over the place, so you had to think about C++ and C strings all the time. C++ also predated things like UTF-8, so things like EBCDIC support have had to be considered; apparently dropping EBCDIC for C++14 caused a bit of drama from banks.
C++ bridges between assembly and higher level languages. Using it to interface with Python, Rust, or Java requires either using SWIG or a similar tool, or using lots of 'extern "C"' in your C++ code. Writing C++ for a microcontroller with QT on a TFT display requires asset packing during the build process that's nothing like making a database. Then there's the constant issues of manual memory management vs STL containers that has only gotten more apparent with newer languages.
C++11 really overhauled the language. That helped a lot with cleaning up rough edges but the ISO committee in charge doesn't seem to know what it wants. Trailing return types (auto x() -> int) were just an odd feature to add in my opinion. There are also hordes of compiler specific extensions that haven't been standardized which don't always play well with newer standard features (GCC target_clones with templates, for example).
People have made comments about std::embed and #embed and the drama that went into getting it through the ISO committees and into C23 and C++26. I'd recommend reading some of the posts of the original author who made it happen for more of the history. Basically though, there was an absurd level of bureaucracy to get through to make anything happen. https://thephd.dev/full-circle-embed
Lastly, I don't think there's ever been a cohesive ecosystem around C++. Linux vs. Windows vs. Embedded vs. SunOS vs. IBM Mainframes vs. Web development vs. Military. Until the ecosystem as a whole decides they want things to get better, I don't think we'll see much traction on tools better than CMake and the like.
Not to flame, but C++'s only redeeming quality is performance. It's terrible in all other areas. (memory safety, easy of use, knowability, etc etc)
It makes so much easy, comfortable and safe.
It's literally all in one tool. It downloads precise version of library from registry (you can define additional by yourself), build everything, pick the right version of compiler (even downloads version of it's missing on pc), links everything, everything is landing in one predefined place (C++ it's usually a preference), add additional env variables, allow to easily flag what is the target of compilation via triples and so much more
C++ has multiple projects to do this, CMake files looks ugly and their readability is good only of you have Stockholm syndrome of using it for years.
C++ should introduce official build tool with easy to read declarative language which does not distinguish where it's run and pull dependencies (lib + headers) to 1 directory
or you admit that this is a sinking ship, or rather a ship that no longer moves and you move onto the thing that actually is built from the ground up for modern practices, has a package manager, doesn't have a spec of CMake hell, just works, is heavily backed by the industry now, and overall probably has better ergonomics when taking into consideration the vast ecosystem
I think it's naive to think that this stuff will come together in time, or to try to force it to work when clearly it's just a fundamental issue and a limitation due to how C++ was brought up
C++ is now a niche language, and that's okay
The ISO C++ group decided on a bare bones standard library for C++98, a thin layer on top of POSIX, with iostreams, and a last minute addition of Stepanov's HP STL on top, that only became developer friendly with C++11 lambdas instead of C++98 functor approach with operator() overloading.
To this day people are fighting to add into the standard library, basic stuff already covered by those 1990's C++ compiler frameworks, like string handling, networking protocols, UI frameworks,....
If only we had some kind of package management systems that could sort it out instead, and we do, but since ISO C++ does not acknowledge their existence, neither do most C++ shops, each project keeps their own approach, thus library writers have to decide with bubble their want to sponsor, or neither of them, leaving the integration challenge to the users themselves.
However, how much of this is still relevant when we have a tiny offshore team inside our graphics card, remains to be seen.
Honestly iostreams was the writing on the wall on how C++ would fail
That thing is horrendous
Yes the proprietary libs were done (mostly) ok, and Borland outshone there (no wonder Anders went to work on C# later)
Anders went on to work on J++, folks forget C# only came to be after Sun's lawsuit, the .NET research project (Ext-VOS) used J++ as its main language.
f-strings won
Or what some C++ frameworks inspired by them also provided, like MFC, OWL, VCL, and co.
However I never understood the advantage of start/end as you mention.
Note that for the D inspired version of STL, Walter Bright promptly re-implemented them around the ranges concept, similar to the iterators in those other languages.
Why would anyone want to fossilize libraries they use by codifying them in the standard?
And in C++ case, due to how package managers have grown up between OS package managers, conan, vcpkg, CMake find package,.... it adds yet another set of variables besides legal, IT, availability on Artifactory/Nexus/....
Also fossilised libraries are better than having none at all.
Still don't think it's a good idea but YMMV
If you make people's lives easier, they will use you to solve their problems. There is no merit in making life difficult.
The cliche is that the OS's package manager is C and C++'s packaging system. Whenever anyone wants a C++ library, they just run deb/apt/rpm/apk and they have it. But this sucks. Then there is Conan and the like, but they are far from dominant. So ultimately C amd C++ developers are faced with the prospects of having to distribute and consume their libraries as standalone source packages and build their own. This sucks.
Where in Rust you'll just cargo your way into a dependency. Easy.
All the language-level packaging managers I find rather worrying TBH. But it is obvious that this is the main appeal of languages such as Python or Rust: quickly cobble together something from the million code pieces lying around on the internet. That this is a bit of a sleight of hand to distract from the massive security issues this created by distracting people with memory safety.
Almost as if OS/distro package managers were a bad idea in general
After opening the article, to paraphrase: "we need it so that it's easier to write the code that doesn't need reading".
I would say that if that's the premise, why would anyone need C++ to begin with? Just write the whole thing in Rust then like you did? There are many good changes mentioned and many I would like to see happen, but just because they are good changes, not because the language should work better with AI.
Strong opinions are a beneficial adaptation for the individual dev, but it results in very low group cohesion. No two devs agree, they're quick to point out flaws, and unwilling to accept things that are mostly good enough.
This is a disaster for a build system where judgement, tastefullness, and preference are even less clear than core language design. The trait that enabled developers to survive is actively working against their ability to collaborate as a group. You can see it here where 'this worked for me,' stories are met with hostility of, 'thats DOA.'
I don't see a way to turn that ship. It's a culture problem, not a technical one and solving social problems as if they are technical problems misdiagnosis the ailment.
Removing the post about Falco’s article simply because of allegations that it was AI-generated is absurd. I guess this reflects the current state of the C++ community: shutting down critical discussions and slowly heading toward its own demise.
RAII and std::shared_ptr left the chat
So real men use C and not C++, right ;) ?
(Gosh this is dumb)
So they still haven't given up on safety profiles?
The way I understand safety profiles, it has every problem pointed out in this article.
ok, this is sad
https://reddit.com/r/cpp/comments/1y9x3pm/c_needs_to_catch_u...
The tagline of the website is "My Very Best AI Slop"
(do we still say blog?)
To me C++ is an obsolete coal-fired steamboat where every plank and bolt is crafted by hand. The parts you need were never standardized, the parts that were standardized aren't the ones you need, and nothing fits together.
It's clearly past the tipping point, and the committee is rearranging the deckchairs. Nobody is building their future in C++.
I was converted from Rust hater to Rust fan almost instantly, when I cloned a big repo and just started it with `cargo run`. Gosh it was liberating from endless cmake/pkginfo, sketchy configure-make-installs and curl|bash.
F and move on.
I've had occasional issues with building Rust packages, but it's been rare and for specific reasons; Arduino code that was clearly marked as only having experimental LLVM support, a time when I messed up my system paths and broke GCC in general, etc. I wish Rust's Embassy had examples that didn't rely on being in its git repo, but I was able to migrate a project out with two hours of work.
Compare that with trying to compile C++ code and the difference in night and day. The only non-library C++ projects I've had build without much issue are SDL2/3 examples and the occasional open-source game like Endless Sky. Everything else, especially if it relies on a semi-proprietary library? A day or two of fighting with build systems with occasional fights after that.
I had one professional project I was working on where someone buried an '--as-needed' flag in a CMake file that got installed in custom SDK code, so nobody could figure out how to link any sort of .so into the project. Of course, the idiots who made that solution also had Eclipse projects using CMake to generate new Eclipse projects filled with autogenerated code. The fact that the C++ ecosystem even allows those sorts of shenanigans is its own level of red flag.
Absolutely nobody ever thought or said that though ;) And C++ arrived much too late to be the "mother" of anything (the programming language zoo was pretty much already fully shaped in the 1990s). The value proposition was that the maasive C++ foot cannon was the compromise you had to accept for enabling a high abstraction level while getting pretty good runtime performance.
You can read Stroustroup book and still got no idea on lots of important features.
I am not fond of this model to update the language every 2 years without providing resources to properly use it.
If are a cpp veteran you probably can find your way, but if you are not, it seems to me that the language makes the path to become one much harder now.
It's hard to catch up when new software is vibecoded.
With C++, you first have to resolve your linker and crypting template compilation errors, wait forever to build an app, get a debug build, attach a debugger, and navigate even more cryptic symbols and stacktraces.
The core language requirement for agentic software development is that the iterative loop is fast and informative. Apply small delta; feedback; loop. The loop in C++ is too involved, slow, and uninformative.
There is even evidence about it. https://x.com/brunoborges/status/2127773519882690739
The "deprecated tech" is probably powering multiple devices with you in your room right now. Multiple airplane passing ion top of your head right now and the cars in front of your street.
There is tremendous incentive to modernize and support C++ for the next 20y.
The world is more complex than "Judt rewrite in Rust".
It's pretty nice for dependency-less monorepos.
Strange POV to have towards anything.