Rendered at 20:54:34 GMT+0000 (Coordinated Universal Time) with Cloudflare Workers.
teh 1 days ago [-]
I feel almost every single point in this article. I spent the last 5 years of my life fighting c++ in a finance place. Something that should be a 20 minute job becomes 20 minutes & several hours of cmake because abseil in some deep dependency does c++ version detection and segfaults because std::string_view isn't compatible with its own version.
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.
pjmlp 10 hours ago [-]
As polyglot dev, I think hardcore C++ devs, don't really get how much better it could have been, if there was more effort placed into ergonomics.
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.
oivey 1 days ago [-]
> Something that should be a 20 minute job becomes 20 minutes & several hours of cmake because abseil in some deep dependency does c++ version detection and segfaults because std::string_view isn't compatible with its own version.
> 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.
heresie-dabord 1 days ago [-]
> c++ has the weight of history
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.
hmry 1 days ago [-]
I think it's less about having to learn, and more about having to re-do the work for every project. It's not like you just master CMake once, and from then on adding any new dependency with proper cross-compilation, incremental linking, test suite integration, static analysis, etc. only takes 5 seconds.
(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)
sufficientsoup 1 days ago [-]
> several hours of cmake because abseil in some deep dependency
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.
klodolph 1 days ago [-]
Sounds like you’re reconstructing a snapshot of google3
Vaushite 1 days ago [-]
cmake is just a wrapper that generates build commands. If it's not working for you, you can use something else
Conscat 8 hours ago [-]
I was at an LLVM contributor dinner party the other day, build systems came up in conversation, and nobody but me seemed familiar with XMake. The consensus was that the best options are either CMake or Bazel, both of which have many haters and lack each other's features. I think XMake today is mostly really good, very close to being objectively the best in the ways I care about, but if most experts don't know it well, surely beginners will not usually discover it.
Vaushite 4 hours ago [-]
Like any abstraction, you should start by doing it manually until you understand how it works, then automate it
stackghost 1 days ago [-]
>If it's not working for you, you can use something else
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.
CamperBob2 23 hours ago [-]
"Claude, deal with this shit" works just fine. Usually.
scrubs 19 hours ago [-]
[flagged]
superxpro12 1 days ago [-]
ive gone to war with cmake to the point that i was convinced there was some deep temp cache file hidden on the pc that nobody knew about.
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.
jamesfinlayson 16 hours ago [-]
Sound about right.
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.
dapperdrake 1 days ago [-]
Sounds like a way to subtly mess up CI.
lenkite 1 days ago [-]
The funny thing is that after ALL that hoopla, C++ stdlib is actually smaller than Rust std. Rust has TCP networking, UDP networking, IP address manipulation, Child process management, Environment variables, Concurrent channels, Unicode-aware strings, proper Futures, limited Date and calendar operations, Lazy iterator pipelines.
Yes, C++ by design wants to keep its standard library small and tractable, and for the most part agnostic of volatile parts such as hardware or OS kernel advancements. In a programming language that is laser focused on high-performance this is a feature.
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.
SkiFire13 1 days ago [-]
TBH however C++ has locales, time, random, regex, multi-dimensional array spans, simd and more.
lenkite 1 days ago [-]
std::chrono is genuinely good C++! Very well designed.
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.
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..
Conscat 22 hours ago [-]
The function of std random is primarily to describe the grammar of RNG, and imo it gets this right where almost everybody else gets it wrong. It doesn't compose with SIMD unfortunately, and it would be nice if it provided useful generators out of the box, maybe even cryptographic ones too, but it's still important that it tells C++ users not to make some global rand() function.
nly 21 hours ago [-]
Nothing your criticizing requires an ABI break
Inline namespaces mean all of those libraries could be replaced/improved in a binary compatible fashion.
pjmlp 10 hours ago [-]
Unfortunately it does, because some of them are exposed in C++ standard libraries used as dynamic libraries, and then you have vendors like Microsoft that since 2015 refuse to break ABI.
There are even C++ features not implemented in VC++, because they would break VC++ ABI in doing so.
cogman10 1 days ago [-]
The rust "editions" solution would probably work with C++. Make a new 202x edition which removes broken APIs, but keep the old editions around in the compiler because you have to. Add features to new editions and not old editions.
I've got no confidence, though, that C++ can make such a change. It's leadership is just too fragmented and has a lot of old leaders that likely don't agree that any of this is a real problem.
steveklabnik 7 hours ago [-]
It was proposed several years ago, using Rust’s original name, “epochs.” The authors burned out.
Ygg2 23 hours ago [-]
From what I've heard then you break ABI compatibility, which is a no-no for compiled binaries, but not an issue when you compile from source.
cogman10 23 hours ago [-]
C++ doesn't have ABI compatibility, except via C externs.
And since you'd still be maintaining those old APIs, it's not as if they disappear, they'll still be ever present in libc++. The main difference is that the compiler will reject new code which tries to reach for those old APIs.
fpoling 22 hours ago [-]
C++ ABI allows to ship shared/dynamic libraries with C++ classes, virtual methods and template implementations. Rust besides using C-ABI does not have a good story preventing using Rust in quite few niches.
cogman10 22 hours ago [-]
The C++ ABI is only somewhat guaranteed by the specific compiler used. You can't, for example, use C++ classes that were compiled by GCC in MSVC.
Heck, you often can't do things like use C++ classes compiled by GCC 13 in GCC 16. This is the reason the likes of COM [1] exist.
Having editions does not change this reality.
What rust is doing that C++ isn't is frequent releases that change the dynamic semi-regularly. GCC 16 will stick around for a few years and will largely be compatible between minor releases. Rust 1.100 and 1.101 can be completely incompatible if they, for example, bump up the llvm version used under the covers.
> Heck, you often can't do things like use C++ classes compiled by GCC 13 in GCC 16.
That's patently false.
In practice, there are two extant C++ ABIs, the MSVC ABI (used by, uh, MSVC, and clang when compiling for MSVC compatibility) and the Itanium ABI (used by everybody else). Historically, compilers used their own ABI, but when Intel was pushing hard for Itanium, one of the things they did was make the C++ ABI part of the platform ABI (hence why it's called the Itanium ABI), and since gcc was already looking to tweak their ABI for other reasons, they adopted Itanium ABI for all the architectures in GCC 3, about 25 years ago.
Now, there's definitely going to be bugs if you do weird ABI stuff, especially with compiler extensions in the mix, but you can expect the vast majority of C++ code to be ABI-compatible between, say, GCC 4.1 and GCC 30 and everything in between. (And yes, I'm aware GCC 30 doesn't exist yet.)
account42 9 hours ago [-]
To be fair to gp, ABI commonly not only refers to the Itanium/MSVC ABI but also to the binary interface derived from the standard libraries via those system ABI specficications. And that binary inteface depends on both the ABI specification as well as the standard library types. It's the latter where incompatible changes have been made much more recently, the "recent" really noticeable one being std::string breaking compatibility for libstdc++ with C++11 and of course MSVC never made any ABI compatibility between their major compiler versions until reltively recently.
12 hours ago [-]
menaerus 5 hours ago [-]
Do you even understand what it means to break the ABI in a programming language that has been used to write 100+ billions LoC which serve as the backbone for the most crucial production systems nowadays?
Production software that depends on "slow" std::regex or "slow" std::unordered_map or "poor" std::random or <insert your favorite C++ pet peeve>, will, I assure you, under right incentives replace it with their own mechanism at any given time because (1) production cannot wait for the next incantation of std library implementation, (2) production is not a playground for a rolling-wheel like distribution games, and (3) who guarantees that the next version you're waiting for is going to be fit for your problem at hand anyway?
All this break-the-ABI bs really makes no sense for production grade software that runs at scale, and arguably this is all that it matters within this context.
vinniefalco 1 days ago [-]
The Standardization Committee needs to get its priorities in line and solve problems that people actually have, instead of niche problems that corporations have. "Contracts" and "std::execution" are not going to help us build the tower of library abstractions.
hinkley 1 days ago [-]
The chances of the former happening after the latter has become common is pretty low. This is what regulatory capture looks like when it hits a standards body.
dapperdrake 1 days ago [-]
Have you heard of C++ Frequently Questioned Answers [sic] and how exceptions from STL constructors can force you to leak memory? The C++ rabbit holes fold in on themselves.
Now Abseil is a kind of loopy rabbit hole, as well.
At least C++ will trap AGI. No way to escape.
sitzkrieg 15 hours ago [-]
why go back when zig and odin are excellent? besides theyre going to run out of characters for syntax soon
zarzavat 1 days ago [-]
C++ is dying. The only thing keeping it going pre-AI was the large number of experienced C++ developers who had invested decades into learning the language, and I say this as one of those people.
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.
fwsgonzo 1 days ago [-]
Indeed. I've converted one of my projects to Rust via LLMs and it was completely painless and ~same performance. LLMs found a swathe of issues that I ended up porting back as well. I still maintain the C++ library, but it's mostly for my own and existing usages now. I think newer projects will be looking for the Rust crate. I've also noticed that LLMs are doing better with Rust overall: Building, testing, formatting, linting and publishing is all standardized. As it should be.
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).
roflcopter69 1 days ago [-]
I remembered your username, hello libriscv guy, cool to see you posting here! I suppose you are talking about https://github.com/libriscv/libriscv-rs ? Cool to see it!
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.
oreally 1 days ago [-]
bad mistake. would have been more productive to use that LLM to rectify your c++ instead.
sjoedev 23 hours ago [-]
How does this opinion reconcile with their stated experience?
> …it was completely painless and ~same performance. LLMs found a swathe of issues that I ended up porting back as well.
fwsgonzo 1 days ago [-]
The emulator is fairly "complete" right now, I'm not aware of anything that needs rectifying in the sandboxed-supported paths. And the performance is already best in class. I don't think it needs constant changing unless there's a reason?
VadimPR 23 hours ago [-]
I used AI to make existing C++ code better, didn't pay for the increased compile times, and I think I'm better off this way.
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.
oofbey 19 hours ago [-]
The most compelling argument for me is safety. The infosec apocalypse we're all living through right now is almost entirely caused by people using languages like C++ that are unsafe. Rust can completely eliminate that risk, and I'm betting pretty soon that'll be expected for any software people need to trust.
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.
uecker 15 hours ago [-]
Rust does not "completely eliminate that risk" and in practice, people do not mainly get hacked because of memory safety issues. The supply chain risks or Rust are also a massive concern.
resistings-gend 10 hours ago [-]
According to the data we have from large projects, people do infact mainly get hacked because of memory safety issues though.
uecker 3 hours ago [-]
I don't think "data from projects" even gives you this information. Number of CVEs is completely unrelated to risk.
VadimPR 13 hours ago [-]
Rust doesn't completely eliminate the risk, and C++ has tooling you can use to eliminate it as well. The right way to use C++ isn't on its own, it's with asam/usan/thread sanitizer and so on.
CamperBob2 14 hours ago [-]
There is no such thing as an unsafe language, only unsafe code written in a language that supports unsafe actions. LLMs are not perfect at writing safe code, but they are currently on par with skilled humans in that regard, and they are only getting better.
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.
ChrisRR 1 days ago [-]
I can't see it going anywhere soon. The amount of existing projects in C++ still need developers
neuwirth 1 days ago [-]
We live in a world where the labs are still training on Fortran! If Fortran hasn't gone C++ won't either. So no, it isn't going anywhere soon, just by nature of being an incumbent.
cjohnson318 1 days ago [-]
My company has a ton of old Fortran code. They're itching to update it. The only thing holding them back is lack of comprehensive, iron clad testing.
jamesfinlayson 14 hours ago [-]
Yeah I worked at a couple of places with big Fortran code bases. There was very much a desire to replace them but the difficulty was that the new systems needed to very specifically match a lot of business rules that were only documented in the code.
Both are now in the process of being replaced I believe but AI wasn't the enabler, it was finally the will to make it happen on one side and an acquisition of a competitor on the other.
Conscat 22 hours ago [-]
My former employer uses Modtran which, as far as I know, has no adequate replacement in another language to do everything they needed.
tialaramex 1 days ago [-]
What labs?
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]
kergonath 1 days ago [-]
AFAIK Fortran is about 40% of CPU time on HPC clusters (much more or much less depending on the specific field), roughly tied with C++. Python is the new Perl; it’s used on clusters but not for the high performance bits. Everything else is an afterthought.
Yeah, what other commenters seem to be missing is that Fortran these days isn't used for applications programming. It's a DSL for extremely high performance numeric code, since this is more or less what it was originally created to do. It's really good at this! And very, very, very well proven. That's a decent niche.
pjmlp 10 hours ago [-]
And one of the reasons why CUDA won over OpenCL, NVidia recognised the need to support Fortran and bought PGI.
nitwit005 1 days ago [-]
My father got a job at Lawrence Livermore National Laboratory, and they were still running and maintaining Fortran programs.
Atmospheric model that no one wanted to rebuild, due to the obvious complexity.
dwattttt 16 hours ago [-]
I understand not wanting (or even being able) to make changes to the model, but doesn't this mean anything new we learn about atmospheric modelling can't be incorporated?
jamesfinlayson 14 hours ago [-]
Stuff does get changed, just the system itself doesn't get replaced.
I've seen a Fortran job in my town and it was work on some government weather system.
dheck 1 days ago [-]
AFAIK Fortran is still heavily used in the physical sciences, from particle simulations to weather and climate models.
hadlock 22 hours ago [-]
The new guy fresh out of school is hard at work rewriting it in rust for a promotion
bena 1 days ago [-]
R is partially implemented in Fortran.
So while no one where I work knows Fortran either, we have people who know R and so are dependent on Fortran by association.
nxobject 1 days ago [-]
FWIW, I'm hoping someone will do a re-implementation of R that either JITs or does some more optimized byte-compilation... and hopefully they re-implement the numerical routines in Fortran while they do so.
(I poked through the Fortran, it seems to be a bunch of accumulated "I got this numerical routine out of an article" stuff.)
kergonath 1 days ago [-]
> I poked through the Fortran, it seems to be a bunch of accumulated "I got this numerical routine out of an article" stuff.
This sounds pretty much like a lot of R itself, to be fair.
geoz 5 hours ago [-]
[dead]
windward 1 days ago [-]
What kind of existence? COBOL and Ada 'exist'.
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.
trinix912 1 days ago [-]
They've been saying C++ is dying for decades now but it's still here with (almost) all its problems :)
dapperdrake 15 hours ago [-]
Bug-for-bug compatible.
jibalt 1 days ago [-]
You seem to have missed a few things in TFA, as well as the amount of deployed C++ code and the number of installations, not just developer count (which is also massive).
zarzavat 1 days ago [-]
The transition will take a very long time, but it's happening. Deployed code will get rewritten by AI, nobody wants to maintain an insecure C++ codebase in 2026, it's too much of a liability for anything not airgapped.
modeless 23 hours ago [-]
How many of those developers are still typing code daily? More importantly, how many will be two years from now?
jmyeet 1 days ago [-]
This is my belief as well.
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.
dmead 1 days ago [-]
Disagree. It was dead, but now C++ is now back on the table. If you want to write tight loops, rust is still slower on almost every benchmark. The ownership model is interesting, but it's also something you (kinda sorta maybe) can just do as part of a test process in c++.
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.
kstrauser 1 days ago [-]
> If you want to write tight loops, rust is still slower on almost every benchmark.
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.)
kvemkon 1 days ago [-]
How would you ensure LLMs didn't insert clone()s (needless allocations, higher memory footprint, performance loss), where it could be avoided and what about hidden bounds checks?
halfmatthalfcat 24 hours ago [-]
You benchmark, profile and feed the results to the LLM?
mswphd 2 hours ago [-]
you can still profile rust code?
dmead 1 days ago [-]
all of the tests I read on the debian language shootout agree with my experience on asking claude to switch my imaging pipeline to rust.
it's very close, but c++ still seems to have an edge.
dralley 24 hours ago [-]
You kind of have to read the code of the compared examples in the Debian language shootout. Often they're using entirely different algorithms, sometimes they're literally using manual SIMD intrinsics for some languages and not for others. There's no arbiter guaranteeing that the comparisons are actually reasonable.
mahboi 23 hours ago [-]
I guess the parent is talking more about what result you get telling the AI to write in C++ vs Rust, which is a pretty realistic use case
bbkane 1 days ago [-]
You might enjoy reading about the Trifecta Tech Foundation : they're trying to speed Rust up for these use cases.
Thats actually pretty good. I will look out for their results.
kstrauser 21 hours ago [-]
For giggles, I asked Fable 5.2 (Extra High) in the Droid harness:
> I'm trying to play with the "k-nucleotide" benchmark, described at https://benchmarksgame-team.pages.debian.net/benchmarksgame/.... Its input and output files, and the current fastest Rust-based implementation, are in this folder. Can you write a faster Rust version?
Benchmark 1: bin/kn_rust (15 runs)
mean ± σ min … max
Wall Time 361.2 ms ± 5.8 ms 352.8 ms … 371.8 ms
Memory 134.7 MiB ± 0.6 MiB 133.7 MiB … 135.7 MiB
Benchmark 2: bin/kn_fast (15 runs)
mean ± σ min … max
Wall Time 98.3 ms ± 3.9 ms 92.0 ms … 103.8 ms -72.8% (3.7x faster)
Memory 67.1 MiB ± 2.2 MiB 63.8 MiB … 70.2 MiB -50.2% (2.0x less)
It's becoming increasingly hard to say "language A is faster than language B", especially when they use the same backend.
For extra giggles, I'm telling Fable to make the C++ version faster, too. I wonder how close it'll end up to the Rust version.
dmead 13 hours ago [-]
Neat. Those are a lot of inlines.
mahboi 23 hours ago [-]
I usually don't care about the lifetime checks. I pick Rust just for the package manager and other modern niceties. But can totally see some others continuing to pick C++.
ranger_danger 18 hours ago [-]
In addition to the sanitizers, I like to run scan-build and cppcheck as well as clang-tidy/clazy and MISRA checkers if I want to get really paranoid.
zerr 24 hours ago [-]
C++ is a king of desktop GUI when it comes to native languages, no need to use half-baked Rust stuff.
pjmlp 10 hours ago [-]
Not if you mean the desktop GUI frameworks coming from Apple, Google and Microsoft, then have long abandoned C++ for desktop and mobile GUIs.
There is also C++ Builder, however VCL and Firemonkey are actually implemented in Delphi.
Now if you mean Qt, yeah that is right.
zerr 8 hours ago [-]
I mean compared to other popular native languages, including even Go. GUI is not something that comes to mind when thinking about Go or Rust.
pjmlp 7 hours ago [-]
In that sense, alright.
hinkley 1 days ago [-]
Unfortunately people have been saying that for three decades now and my popcorn has gotten stale and been replaced half a dozen times waiting for Stroustrop’s albatross to be buried.
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.
Guvante 1 days ago [-]
Porting code is basically impossible beyond extreme cases which is the entire reason C++ has been around for quite a while (once everyone else caught up on low level OS compatibility)
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...
gambiting 1 days ago [-]
It's still the most popular language for writing video games in, and it's an industry larger than films. C++ isn't going anywhere, unless Sony/Nintendo/Microsoft somehow provide SDKs for anything other than C++. But they can't even provide non-windows compilers for their toolchains, so I won't hold my breath.
munificent 1 days ago [-]
> It's still the most popular language for writing video games in
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.
Conscat 21 hours ago [-]
Higher level game projects or systems often favor dynamic and/or garbage collected languages but it's unlikely that performance hard portions will switch to another language ever.
0xbs0d 24 hours ago [-]
The Unity engine itself is built in C++ the for writing the games you use C#
fwsgonzo 1 days ago [-]
And this is a problem why? As if an LLM couldn't make an SDK in < 1 day for any of these? Maybe I'm missing something, but I have a game project that publishes for homebrew Switch and PS5. Currently playing my game on my TV. The toolchains are nothing special, just the same old LLVM libc++ (maybe with musl for static) with some custom stubbing to "virtualize" filesystems and what not, since I did use std::filesystem for desktop clients. I have no idea why you couldn't do the same in Rust in less than a day, even without LLMs. Sure, you'd have to understand toolchains and some low-level library things, and BSD-isms (SIGSYS begone!).
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.
nc0 23 hours ago [-]
Legal reasons, studios don't target homebrew and jailbreaked versions because it is in violation of their contracts, and the people running those versions aren't relevant to the market anyway.
Just saying. C++ will soon have no moat in video games anymore.
Conscat 21 hours ago [-]
Rust's values are fundamentally antithetical to what game developers' actual problems are, and Rust has made very little progress in these areas since 2014. They get basically footnotes on the roadmap each time.
mahboi 23 hours ago [-]
I've heard this so many times. Rust will begin to replace C++ for video games when it becomes easier than C++ for video games. That means not just the language but the entire ecosystem being more geared towards games. I get that Rust has a nice package manager and all, but idk about the game ecosystem there. And memory safety isn't a big concern there.
teddyh 1 days ago [-]
At least C++ has an ABI and can produce dynamically linked executables and libraries.
lenkite 1 days ago [-]
C++ officially does not have a documented ABI. The ISO C++ standard intentionally omits an Application Binary Interface (ABI), leaving binary-level rules entirely to compiler vendors and operating systems. A massive PITA, because so many wonderful papers are rejected or take years (even decades!) because of "will break ABI" - leaving their authors in tears as their work of years go up in smoke.
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++"
spacechild1 1 days ago [-]
I think you are confusing two things:
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.
1 hours ago [-]
KerrAvon 1 days ago [-]
Those problems are related, though. The fragile class layout problem is solvable in theory in a standards compliant-way but unsolvable in practice because C++ doesn't standardize the ABI.
spacechild1 22 hours ago [-]
Again, I'm not talking about the compiler ABI. The layout/alignment rules for PODs are the same as in C. Otherwise you couldn't write or consume C APIs in C++.
Yes, in theory, the layout of classes with private/public/protected sections is implementation defined, but AFAICT every compiler just puts the members in the order they are declared and they will not suddenly change their rules.
ABI breaks in libraries simply happen when you change the members in a struct or the parameters in an (exported) function. Of course, this can also happen in C libraries!
The only reason why it's not a big problem for the C standard committee is that C barely has a standard library :) But even they occasionally run into ABI break issues, see time_t or intmax_t.
flohofwoe 1 days ago [-]
...I guess you're thinking of C? There is no standardized C++ ABI and most likely never will be (you can't take a DLL built with one C++ compiler and expect it to work with an executable built with another C++ compiler (or even a different version of the same C++ compiler, or even just different compile options), unless the DLL exposes a plain C API.
kimixa 1 days ago [-]
The "C Standard" doesn't guarantee ABI stability either - hence different platforms, OSs and sometimes even compilers not being interoperable.
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.
ptx 8 hours ago [-]
Why is it that MinGW can use libraries like user32.dll and kernel32.dll (without which it wouldn't be of much use) but not other DLLs compiled with MSVC? Is it just about the CRT?
And relatedly, why does Rust require MSVC [0] to interoperate with "C/C++ libraries"? Clearly the MinGW target works with C libraries like user32 (right?) and I thought Rust didn't interoperate with C++ anyway.
Because the "System Interface" for windows is defined as those DLLs, just as the "System Interface" in Linux is defined in syscalls. So the gcc developers implemented enough of that ABI to interface with them, which is used in mingw builds of gcc.
And they're generally designed around the indirection and encapsulation needed to ensure that CRT or other internal types are exposed directly over the boundary (assuming that they even use the CRT internally at all) so avoiding the issues of multiple different CRT versions.
You could very much design a c++ interface that behaves similarly, completely encapsulating all types and operations from the API users. Methods are just function calls with specific pointer arguments and funny mangled names. The arguments are as well defined in the ABI as C arguments. It's just most people don't bother as it can be a lot of work, and can sometimes work against what people consider "idiomatic c++", which tends to encourage relying on specific object layout to allow direct offsets, allocation on the stack and similar.
But really my point was there's nothing magic about "C" vs "C++" - just people have put the effort in on the C side to define the interface on many systems. Likley because many of those system we still use today happened to be developed when C was king so ended up using that as a baseline for many things. And then why bother doing the same again for C++ when you already have an interface defined? A second parallel interface seems like a lot of work. There are some OSs that do define their system interfaces in ways that fit C++ more - Symbian for example.
For rust, I suspect that might be because the gcc MSVC ABI implementation is either incomplete or buggy in ways the Rust developers hit. It may be the "System Interface Libraries" mentioned above simply don't have all possible constructs in their interfaces so doesn't care about the implementation being incomplete, but rust does. Or they simply don't trust it to be /entirely/ compatible and don't want the bug reports.
steveklabnik 7 hours ago [-]
If you need the MSVC ABI, you need MSVC. If you don’t, then you don’t. Rust provides both options. MSVC is more native than mingw and so is presented as the default.
simonask 1 days ago [-]
C++ compiler vendors actually go to really great lengths to ensure that you can at least use the library if it was built with the same brand of compiler and the same standard library.
This used to be a much bigger problem, but it really isn't today.
cocoto 1 days ago [-]
Completely false, I have recently compiled many C++ dependencies from an old Debian/gcc version and it works flawlessly when used as a dependency on the latest Debian with much more recent gcc version.
legobmw99 1 days ago [-]
The parent comment's point is that this is luck, not something the standard promises you
gpderetta 13 hours ago [-]
It is in fact not luck, but something that the platform compilers guarantee.
When writing c++, the ISO standard is only one of the many standards you might rely on.
1 hours ago [-]
mahboi 23 hours ago [-]
Is this one of those things that pretty much always works in practice despite the spec technically not supporting it, or is it actually more of a coin toss?
luke5441 23 hours ago [-]
The standard committee is currently tilted towards the faction that does not want to break backwards compatibility. So they won't be introducing changes to the standard that require such breaks (such as the std::string break).
They do not specify that the implementations should be backwards compatible or specify e.g. binary layouts of types, so it is up to the specific implementations (such as gcc & glibc & libstdc++) to guarantee this.
gpderetta 11 hours ago [-]
C++ has been dying for as long as I have been programming professionally. I'm not holding my breath.
If anything, the concept of caring about the programming language something is implemented in might be dying.
pjmlp 10 hours ago [-]
I have seen it take off, from being used everywhere on Windows, OS/2 software, to now having specific niches like LLVM/GCC, CUDA, and such.
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.
nly 1 days ago [-]
C has most of the same problems raised in the article. You'll notice there's no "C SDK" on all those third party SDK lists either. There's no universal package manager for C. No standard library worth a damn.
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.
whizzter 1 days ago [-]
Kinda disagree here about the "elegantness", superficially it's an elegant abstraction to unify generator-like coroutines and "tasks".
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).
nly 1 days ago [-]
I'm not too familiar with generators. I've never really had much use for them. I've used co_yield once successfully to interleave two separate tree recursions in lock-step and I don't remember any issues.
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?
BeeOnRope 1 days ago [-]
Well LLVM supports HALO optimization can remove frame allocations when the coroutine lifetimes are suitably nested, though you need to apply some specific annotations to assert this is safe in a given context before it will kick in.
> there is kind of the machinery via the new overloading for the promise
Any details?
whizzter 9 hours ago [-]
You can add an "new" operator to the promise type for the task holder type, some coroutine libraries mentions cactus stacks for low allocation and I'm pretty sure they're fiddled together some kind of arena allocation system for "soft-threads" via thread-locals and the promise operator new that becomes low or even more or less zero-allocation in practice (but at the time I was looking at it I bailed to a heap-heavy variation to get it stable).
C++ coroutines are always heap-allocated, precisely because their lifetime is so hard to predict.
silvestrov 1 days ago [-]
I think C and C++ always have suffered from wanting to support all kinds of weird architectures like 9 bit bytes and 80286 style segmented memory. So many people see this as a virtue rather than restricting the usefulness of C.
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.
foldr 1 days ago [-]
>I don't think many C programs will work well if char is a 32 bit type so it supports full unicode.
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.
silvestrov 12 hours ago [-]
A char is not the same as the basic type that is used for encoding strings.
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.
foldr 11 hours ago [-]
You’re mixing up characters and code points. But not even a single unicode code point can fit in 16 bits. Java’s char type and string encoding is a perfect example (with hindsight) of what not to do. Go’s “rune” type, that I mentioned, is more sensible. It holds a single Unicode code point, while strings are encoded as UTF-8 (so code points are encoded in variable numbers of bytes).
ghosty141 1 days ago [-]
> C has most of the same problems raised in the article
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.
Vaushite 1 days ago [-]
No one does it, but I did do it recently and it was like a breath of fresh air being outside all these frameworks. Of course it brings problems that you don't have in a framework, too.
uecker 15 hours ago [-]
Perhaps people should write desktop applications in C more, as ones I use that are written in C are the applications I like most.
banktops 1 days ago [-]
The one I know about has stuck around for 30 years, no one has been able to replace it. Many have tried, all failed. It’s just too big to fail.
ghosty141 1 days ago [-]
I don't disagree that C is here to stay, I'm saying that C is in a different position than C++ where its shortcomings don't matter as much.
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.
1 days ago [-]
vinniefalco 1 days ago [-]
We have developed coroutine-native networking for C++20, and designed it to become a de-facto standard. It has no external dependencies. It does not require Boost.
https://corosio.org
jayd16 1 days ago [-]
I think you touched on the main issue but blew past it. There isn't a simple, universal package manager solution.
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.
bluGill 1 days ago [-]
If you can swap out the implementation then that means you can't mess with the API.
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.
bee_rider 1 days ago [-]
C shouldn’t suffer from these problems. It is just not a language to write massive projects with a ton of complex dependencies in.
C will make this obvious by stepping on your toes. C++ will help you along until it has enough leverage to break ‘em.
mschuster91 1 days ago [-]
> There's no universal package manager for C. No standard library worth a damn.
The package manager for C is whatever your distribution uses plus pkg-config. The standard library is the C standard stuff plus POSIX.
skydhash 1 days ago [-]
Yes. If you're going to be portable, wrap your code in a portable layer. Trying to fit everyone expectations is how you got a bloated environment.
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.
ryandrake 1 days ago [-]
Yea. I don't want a package manager for my programming languages. My OS has a perfectly good package manager, and when I use it to obtain software, I know I'm getting all dependencies and everything is integrated well into my existing system.
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.
1 days ago [-]
pjmlp 10 hours ago [-]
Which is why I usually joke that UNIX is the "C runtime".
ActorNightly 1 days ago [-]
>There's no universal package manager for C. No standard library worth a damn.
There is, its called Linux kernel, along with whatever package manager used to download the headers and shared libraries.
filipdobro 2 days ago [-]
> Dependency friction in C++ is so punishing that authors advertise “header-only, zero dependencies!”
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.
mort96 1 days ago [-]
I can not express how disinterested I am in using a Microsoft Visual C++ package manager. There will always be a large contingent of C++ users who won't touch vcpkg with a 10 foot pole.
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.
simonask 1 days ago [-]
> Anyway I don't understand the aversion to just using submodules.
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.
mort96 1 days ago [-]
No they don't? You just add the shared transitive dependency as a submodule in the top-level project and express in the build system that it's a dependency in the library's meson.build.
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.
simonask 1 days ago [-]
I'm sure you can see how that doesn't scale without significant effort. Stuff like this is why dependency management in large C++ projects is extremely draining. And if you don't get it right, boom, ODR violation = UB.
The end result is that many C++ projects spend a huge amount of time whenever a dependency is added or updated, so they tend to avoid it and lag behind, leaving performance and bugfixes on the table.
Meanwhile, Cargo even supports linking multiple versions of the same dependency without issue in the same binary. It is lightyears ahead.
mort96 1 days ago [-]
Sure, it doesn't scale to your typical node.js project with thousands of dependencies. That's a good thing.
imtringued 1 days ago [-]
ffmpeg has 100+ transitive dependencies. I don't see what language or language package managers have to do with the number of transitive dependencies.
account42 8 hours ago [-]
ffmpeg has that many dependencies because each of them implements a codec or hardware integration or other feature that ffmpeg users want, not because someone has decided to make left_pad into a separate library.
iamsaitam 1 days ago [-]
"it's not a bug, it's a feature"
mort96 1 days ago [-]
Well yeah. When things become easier, people do it more, whether it's good or bad. Therefore, good things should be easy and bad things should be hard.
Having thousands of transitive dependencies in a super deep dependency graph is bad.
I really like Rust, but I think there's a convincing argument to be made that if you had to manually run 'cargo add' for every dependency, not just the direct ones, its ecosystem would be in a better state. Those transitive dependencies are part of your project. You should be aware of them and have a relationship with them and vet them.
arendjr 1 days ago [-]
There’s lots of things we “should” do but don’t. I can agree with you that having lots and lots of transitive dependencies isn’t a good thing, but the thing is, it does remove a lot of day-to-day headaches for people and allows them to work at speeds they couldn’t before. That’s a good thing for them that they value at the expense of most other things.
People want results first, optimisation later. This gives them that.
There’s also a good argument to be made that you shouldn’t always give people what they want, but it’s easy to see why Cargo is so popular.
mort96 1 days ago [-]
I agree with your premise and disagree with your conclusion.
There's a lot we "should" do but don't. That's exactly why I think incentives are so important. When I want to add a Cargo dependency, I should look through every dependency that was added after running 'cargo add' and vet it. But I don't, because it's so easy to not do that.
If I had to run 'cargo add' for each transitive dependency manually, there would be two positive effects:
1. I would be forced to at least be aware of which transitive dependencies I'm adding, I can't just ignore them anymore. This is at least a part of the vetting I should be doing today but don't.
2. It would incentivise libraries to use fewer dependencies, because each one would add extra work for the user. The C++ ecosystem has a ton of those "dependency-free header-only" libraries because both being header-only and being dependency-free makes adoption easier in C++. A similar (though lesser) phenomenon would affect Rust if Cargo made you manually add each transitive dependency.
simonask 1 days ago [-]
Pious suffering is not a virtue.
We're trying to get thing done, here.
mort96 1 days ago [-]
Where did I advocate for suffering and not getting things done
simonask 1 days ago [-]
In your entire comment?
You're taking the baffling position that managing dependencies should be hard, tiresome, high-friction.
You're free to suffer on your own, but the rest of us will absolutely move on.
mort96 1 days ago [-]
[flagged]
fc417fc802 1 days ago [-]
Exactly. Reading that entire exchange I just kept thinking things like "but why would you want that" and "but doesn't that lead to insecure software".
When I use languages that aren't C or C++ I actually audit my dependencies and I don't adopt libraries that would transitively add half a dozen to my project. The result is that I generally can't find acceptable candidates and I end up rolling my own. So I very strongly prefer to remain in the C++ ecosystem where I can check a header only solution into my source tree and just get on with life. (Related, eigen is a work of art.)
But if you really feel you need package management and you can't stomach cmake then consider an agnostic nix-alike or the one that your OS relies on rather than something language specific. Package management should be left to dedicated package managers. I shouldn't need half a dozen different managers pulling from their own centralized repositories.
jayd16 1 days ago [-]
Oh yea, it's the way every other popular language does it that is unsafe. Not C++.
Custom and out of date code we manually audit is better than packages that can be automatically scanned for known issues.
fc417fc802 1 days ago [-]
I realize you're being sarcastic but I unironically agree. Code shouldn't constantly churn.
You can still scan for known issues. Rather than checking version strings in the case of full repos you can check branch names or commit hashes. In the case of individual files you can look at checksums. You can even scan your source tree for known snippets.
jayd16 4 hours ago [-]
Why not have a manager for that sort of thing then?
fc417fc802 3 hours ago [-]
You mean an automated vulnerability scanner that can sift through bare repos and raw source code to flag known issues? Isn't that exactly what I was describing? Does that not already exist?
preg_match 17 hours ago [-]
I mean yeah probably, I would say custom code that isn't doing critical things like cryptography is more secure. It's a much smaller supply-chain risk, you understand it better, and you can patch it immediately. It's never be easier with LLMs. There's just very little value to a lot of dependencies now.
People also don't consider that most dependencies suck ass. Not on purpose, but because they're trying to be generic libraries. They have edge-cases and legacy baggage out the wazoo, bugs that will never be fixed for political reasons, and shit tons of code. If you just write it yourself, it's likely you can develop something higher-quality and better suited to your needs with 100x less code. No exaggeration on 100x.
jayd16 1 days ago [-]
Classic sour grapes.
mort96 1 days ago [-]
I find working with node.js projects with thousands of dependencies to be very uncomfortable, when I'm doing web stuff I go out of my way to try to avoid that for the most part but it feels like I'm fighting the ecosystem the whole way.
If that's sour grapes then so be it.
1 days ago [-]
quietbritishjim 1 days ago [-]
> Microsoft Visual C++ package manager
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.
mort96 1 days ago [-]
The "vc" in "vcpkg" stands for Visual C++.
pjmlp 1 days ago [-]
Because that is where it was born, and the team that owns the project.
mort96 1 days ago [-]
And it means it's completely uninteresting in my eyes.
pjmlp 1 days ago [-]
Nowadays that will cut out plenty of open source projects, given Microsoft sponsorship.
mort96 1 days ago [-]
Which other interesting projects are called Microsoft Visual C++ anything? I'm not sure I've seen any that piqued my interest
pjmlp 1 days ago [-]
Ah so Microsoft can sponsor whatever they feel like, just not prefix the name with vc.
mort96 1 days ago [-]
Why do you think I would care about a project receiving money from Microsoft? I don't love Microsoft-owned projects and I especially don't like Microsoft Visual C++ but if Microsoft just wants to give a project some money, why would I care
pjmlp 1 days ago [-]
Because usually we get this attitude, "And it means it's completely uninteresting in my eyes.", while at the same time it gets invalidated by using other technology exactly from the same company.
mort96 1 days ago [-]
By "from the same company", do you mean "projects run by Microsoft" or "projects which Microsoft sometimes gives money to"? I avoid the former as much as is reasonably possible, while I truly couldn't give a damn about the latter as long as it doesn't result in undue control.
If I wanted a package manager, I'd have to pick between the Microsoft Visual C++ package manager, and Conan. There's no world where I pick the Microsoft Visual C++ one over Conan.
But it happens to be the case that I haven't felt the need for a C++ package manager. I'm happy using a combination of system packages, vendored dependencies, submodules, meson subprojects and meson wrap files.
I do sometimes use Typescript because there's no reasonable alternative and the advantage of having type-checked JavaScript outweighs the downside of using a Microsoft language. So there's that. Every choice has trade-offs.
stackghost 1 days ago [-]
If I were to hard-fork vcpkg and assemble a small cadre of maintainers that had no ties to Microslop, would you be interested in my awesome new package manager?
mort96 21 hours ago [-]
Not really, since I don't feel the need for a package manager. If I did I'd be using Conan.
But if you did that, and your project got some notoriety, and I later decided I wanted a package manager, I would be evaluating your vcpkg hard-fork against Conan and whatever other alternatives would exist and choose the most appealing one. I wouldn't avoid your hypothetical fork just because it'd have commits from Microsoft employees somewhere in its git history.
classified 1 days ago [-]
The Conan package manager is cross-platform and just what the doctor ordered for C/C++.
I still don't see why I would want it. Any project which includes a meson.build is super easy to just add as a submodule.
mirmor23 1 days ago [-]
> We have CMake which is wide-spread but garbage, and we have Meson which is pretty good but not as widely adopted
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.
duped 1 days ago [-]
> what we need is a decent standard build system, not a package manager
These are the same thing and the more you reject it the more you suffer
mort96 1 days ago [-]
Well they're not. Maybe they should be but they're not.
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.
duped 1 days ago [-]
This is "the more you reject it the more you suffer" part
CMake and Meson both support package management. Conan also is a build system as much as a package manager. NPM is a build system, too. The degrees to which they try to pass off responsibility to other tools is why they suck.
> a clean concept of what a "package" is
First mistake: assuming you can define this. Good build systems/package managers don't define this at all, nor should they. It's natural for software developers to want to put limits here and try and box things in but it just makes life harder for everyone.
A build system orders individual operations that take inputs and yield outputs. That's it. This is what Make got right.
Package management is just an extension of that.
> a build system does not need to know how to download packages
Downloading is trivial. The actual package management part is checking hashes, version unification, and handling updates.
There's just no argument to me that these need to be separate tools, when bad tools wind up doing the same work poorly.
happyweasel 1 days ago [-]
Vcpkg solved most of my problems in a windows env - vs+msbuild+vcpkg in manifest mode. It is also not really intrusive, just one json file. Auto link is very useful. I am very happy when I see a dependency is available via vcpkg.
egorfine 1 days ago [-]
Unfortunately, vcpkg is not (in practical sense) available for operating systems, it's a windows-only solution.
luke5441 1 days ago [-]
Wrong. It works on all major OS, even for Android.
egorfine 1 days ago [-]
I stand corrected.
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.
luke5441 1 days ago [-]
I'd claim it works better on Linux. But depends on what kind of packages you use, I guess.
And it was a separate installation from Visual Studio for a long time as well.
egorfine 1 days ago [-]
I do manage a build cluster for Windows/macOS/Linux and I have to manage a bunch of dependencies built in a plethora of different ways and configurations on all three platforms.
It's still hell. And vcpkg is definitely not the hottest place in it.
Chaosvex 1 days ago [-]
Works perfectly fine on Linux. I use it on multiple platforms, no bother.
egorfine 1 days ago [-]
You are the second person to tell me it's nice on linux.
Seems I should actually give it a try. Thanks!
atemerev 1 days ago [-]
I use Spack, from my academic years.
pjmlp 1 days ago [-]
My only pain point with vcpkg is the team's reluctance, or lack of resources (in a 4 trillion valued company(!)), to make the experience at least as nice as using NuGET, across VS and VSCode.
Note that Clion does exactly this for vcpkg.
madduci 1 days ago [-]
Yeah, and where are all these zero dependencies libraries that implement TLS, JWT handling, Database Connection? Are here with us?
on_the_train 1 days ago [-]
Vcpkg was really hurt by skipping a release, without any communication, even ignoring tickets. We thought that our single source of dependencies was silently killed.
Eji1700 1 days ago [-]
> C++ still owns bare metal, low-latency trading, game engines, GPU inference kernels, and decade-spanning binary ABI stability
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
r_lee 1 days ago [-]
I think C++ very likely might still be the choice for GPU stuff or trading or any kind of number crunching, maybe also game engines
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
pjmlp 1 days ago [-]
Unless they turn around, even Epic is downgrading their C++ support with Unreal 6, all gameplay code will be a mix of Verse and AI, Blueprints and C++ are out.
0xbs0d 24 hours ago [-]
Except the engine itself is written still in C++ and what you're talking about is the layer you use to create games on top of that.
pjmlp 14 hours ago [-]
I have not said otherwise, and it doesn't change the fact they are removing a C++ layer from the engine.
In fact, the official position thus far, is to use Verse FFI for those that wish to keep gameplay code in C++.
r_lee 11 hours ago [-]
so:
> for games, probably it'll be hidden behind FFI, like a lot of it already is like in the ML space
?
pjmlp 11 hours ago [-]
Yes, which is a downgrade from having first class support.
Going forward instead of directly making use of Unreal Engine's Gameplay Framework for C++ projects on Visual Studio, one needs to create a wrapper library, in pure C++ code logic, to be consumed by Verse Scene Graph.
Also having to use two debugging environments, when trying to find if the bug is on Verse side, or C++ side, coupled with a more complex build pipeline approach.
Hardly the same thing.
Julia and Mojo were designed exactly by folks that had enough of writing CPython FFI.
DrBazza 1 days ago [-]
For low latency trading, C++ templates and constexpr are the significant unique selling points. If Rust gets at least equivalent or better functionality, then there's not much reason to continue using C++. Other opinions may differ.
kajaktum 16 hours ago [-]
Just go straight to fpga. Its not that much different with AI doing it
amluto 23 hours ago [-]
C++ doesn't even own low-latency trading -- Java has a surprisingly large presence.
But I expect Rust or something else will make substantial inroads. I think a big part of C++'s dominance is just inertia.
worried_individ 1 days ago [-]
what AI literally does is make unobservable language/code level differences between languages irrelevant.
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 .
elcritch 1 days ago [-]
> 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.
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.
Eji1700 1 days ago [-]
I mean to be fair I use F# and after the initial "It has no idea how this language works because its not JS/Python" phase about a year ago it's been wonderful.
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.
elcritch 1 days ago [-]
> 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.
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.
pjmlp 1 days ago [-]
Rust still has the issue that its reference compilers depend on C++ tooling.
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.
simonask 1 days ago [-]
Why would you think this is an issue? Replacing LLVM with something written in Rust is immaterial to Rust's success for developing any other project than LLVM.
pjmlp 1 days ago [-]
Because that is the usual hype from Rust Evangelism Strike Force of 100% C++ and C replacement, while forgetting the small detail regarding the compiler itself.
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.
simonask 1 days ago [-]
So it's an imaginary problem that an imaginary person has.
Still looking forward to meeting this mythical Rust Evangelism Strike Force. I keep hearing about how prolific and intrusive they are, yet somehow they seem to have left the room just before anyone sees them, every time. It's curious.
pjmlp 1 days ago [-]
Then you have not been reading enough "XYZ rewritten in Rust" blog posts and related comments.
Or how they managed to push ThePhd and Actix-Web original author away from the community.
The WG14 and C has a lot to thank for having ThePhd refocus on C.
simonask 1 days ago [-]
> Then you have not been reading enough "XYZ rewritten in Rust" blog posts and related comments.
People writing about their Rust project counts as toxic evangelism now? I swear, some people seem to receive any mention of Rust as a personal attack.
> Or how they managed to push ThePhd and Actix-Web original author away from the community.
You're referencing community drama from half a decade ago. A lot has been written about both of those situations, but I'm not sure how it's relevant today. For the record, I think we all agree that both situations were tragic and had an unacceptable human cost, regardless of any technical merit of the criticisms raised.
pjmlp 1 days ago [-]
The meme wasn't created out of thin air, and lets leave at it, unless you want to pursue the whole history behind it.
dralley 24 hours ago [-]
>Or how they managed to push ThePhd and Actix-Web original author away from the community.
While the level of hate the Actix Web author got was excessive, and I respect their contributions to the open source community, their position was genuinely kind of absurd.
On one hand it was being proudly declared and advertised as production-ready and used by his employer (Microsoft). On the other hand, when a safety issue was reported:
* First it was dismissed as not a real issue and exploiting unsafe was required for performance / because it was a fun hobby project for them
* When it was proved to be a real issue with a reproducer, and a fix was submitted that used no unsafe and yet did not regress performance, the PR was closed with the statement "this patch is boring". Like there was nothing actually wrong with the patch, it just wasn't "fun" enough as opposed to using unsafe code incorrectly.
If it was advertised as a hobby project in the first place, people would just move on to something else. But when it is advertised as being a serious project, gains adoption on that basis and then isn't treated seriously when real issues show up, I don't think it's unreasonable to get upset about the misrepresentation.
The degree to which some people got upset was a bit crazy though. Obviously death threats (alleged) are bad.
1 days ago [-]
oreally 1 days ago [-]
It will last forever now that LLMs are around to detect and describe ways to fix c++ gotchas.
grougnax 5 hours ago [-]
[dead]
JoeDohn 5 hours ago [-]
Hard to disagree, the eco system around rust (cargo, clippy, crates, implied alignment in types and conventions that emerges from crates integration) is as important as safety.
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 :)
virtualritz 10 hours ago [-]
I worked in VFX for many years and fighting C++ tooling/dependencies cost me thousands, maybe ten thousands of hours of my life.
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.
franzb 2 hours ago [-]
Moritz!! Hello!
Kuyawa 1 days ago [-]
"AI Won’t Save C++"
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
asveikau 23 hours ago [-]
> raise only those modernly designed for token optimization
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.
olooney 24 hours ago [-]
I know of at least one widely used, general purpose language that was designed to be used by AI, and presumably was largely designed by AI: OpenAI's Declarative Interface Language, or DIL. It's what ChatGPT uses to generate interactive widgets inside the chat.
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.
jjmarr 24 hours ago [-]
I need to deep-dive on this because it's crazy.
Kuyawa 8 hours ago [-]
I guess they asked ChatGPT to design it from scratch using all the programming language design knowledge available, then when ready they just asked to transpile all of github repos to that language and there you have it. A new language with all the training data necessary to be perfect
That's exactly what I did with 'Jobs' except the github transpiling, but it came up with a good enough language with examples and everything. So yes AI can do it, will do it and some already started
One thing open source taught is that you don't need ISO committees to produce good, maintainable programming languages. C++ spent too much on bureaucracy and stopped being pragmatical.
Nowadays only existing codebase prevents projects from moving to Rust.
simonask 1 days ago [-]
> you don't need ISO committees to produce good, maintainable programming languages.
Many would argue it even stands in the way.
rob74 1 days ago [-]
Well, if you only have one implementation, you don't need an ISO standard. C++ is from a time where several companies would implement their own (gasp!) closed-source compilers and try to make money selling them. So a standard was needed for interoperability. Of course, having several implementations also makes it more difficult for a package manager and "standard" packages to establish themself.
harry8 1 days ago [-]
And with c++ no two compilers were compatible. When gcc became standard compliant and also good things changed.
The standard is also very difficult to understand.
Standardisation didn’t work as might have been hoped.
gignico 1 days ago [-]
Those are all the same reasons why I switched to Rust after 20 years of C++. Not the borrow checker, even though it’s fine to have. Pattern matching and ADTs would be also appreciated these days…
marsten 1 days ago [-]
C++ long ago decided not to touch the packaging problem, and seems intent on sticking with that choice. No doubt they wanted to avoid controversy.
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.
daemin 1 days ago [-]
If they did go down that route it would have been mired in standardisation hell and probably turned out as good as modules.
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.
superxpro12 1 days ago [-]
i dont know how anyone can look at "autoconf" and conclude that is the superior solution. it's screams "old guard" more than anything else.
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'.
giancarlostoro 1 days ago [-]
I'm surprised nobody's made an "experimental" standards committee for C++ where they can approve features that are being considered for C++ but not fully approved, orgs that build compilers could target approved experimental features, and we can all see what it functions like and looks like ahead of time, once proven, the official committee approves it.
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.
Xirdus 1 days ago [-]
GCC routinely adds support for C++ features before they're fully approved. -std=c++0x was added 2 years before C++11 was published, and initially included some features that were ultimately removed. -std=c++26 is available since 2024 and -std=c++29 is going to be added soon in GCC 17.
Similar story with Clang, though CBA to find exact dates/versions.
jcranmer 1 days ago [-]
That's not actually adding support for features before they're approved.
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).
Xirdus 1 days ago [-]
It was called C++0x literally because the date was unknown.
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.
Xirdus 1 days ago [-]
And Rust nightly feature implementation only starts after the RFC process completes and the change is approved. Which is equivalent to adding a proposal to C++ working draft (both indicate it's almost certainly going to become part of the language as is, in their present form, with only one more vote afterward to irreversibly confirm it.)
So either way, C++ compilers are just as willing to add experimental features as Rust, or equivalently, Rust is just as unwilling as C++.
nitwit005 1 days ago [-]
That is quite literally adding features before they're approved. Even in your link, a table has a heading "C++29 Proposal".
jcranmer 1 days ago [-]
Those are features that were voted into the C++29 standard two weeks ago or five months ago.
Xirdus 1 days ago [-]
P3733 isn't part of either 26 or 29 draft at the moment, correct? And it's already implemented in Clang 23.
Approval into the working draft is the stage that compiler implementers actually care about; the ISO approval step is basically meaningless to them. Which is why it seems that all of the compiler implementers on the committee preferred the option of "cancel C++26" to the entire C++26-draft-ballot-failed debacle.
jcelerier 1 days ago [-]
> orgs that build compilers could target approved experimental features,
there's no law that clang, gcc, msvc must only implement official released C++ standard feature
giancarlostoro 1 days ago [-]
Agree, I almost suggested those key people that are frustrated with the current standard should consider making their own C++ standard, but splitting up C++ would not really help, having an experimental standards body might be the better move. something like C++/EX27 or w/e
jayd16 1 days ago [-]
This is every single C++ project.
giancarlostoro 1 days ago [-]
Yeah but this would be a standard backed by people presumably part of the official standard itself.
Blackthorn 21 hours ago [-]
This is pretty good but I want to take exception with one particular point:
> 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.
mbrumlow 2 hours ago [-]
No. C++ just needs to be replaced with rust. Far cheaper to do. Retrofitting c++ will just result in c++ code bases we think are secure but are not actuality.
harrouet 13 hours ago [-]
The lack of a widely-used package manager in C++ is also a killer for a major EU regulation: the CRA.
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.
ghosty141 12 hours ago [-]
Spot on, we face the same issue at work. For embedded stuff yocto can generate the SBOM but for desktop applications there is almost nothing that's really practical.
edukite 2 hours ago [-]
I think author in a way is missing the point. At least at the end. C++ does not requires here and now more stuff in std. It desperately needs something like cargo from rust
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
naikon 1 days ago [-]
I agree completely.
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.
cv5005 22 hours ago [-]
Re missing package manager and easy deps in C++: AI has changed the game.
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.
petters 1 days ago [-]
The author cites articles like https://arxiv.org/abs/2505.04254 from one and a half year ago, using models like GPT 4o and Gemini 1.5 Flash. I think many of the points of the author just aren't true. Of course Opus 5.5 and Astra will be able to compile a C++ project!
The best research i know on the (admittedly understudied) subject is by Dan Luu: https://danluu.com/pl-tokens/ and subsequent articles.
waynecochran 20 hours ago [-]
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.
rdong8 1 days ago [-]
all the build system/package manager related complaints here are addressed with Bazel, which among other things:
- 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.
init 1 days ago [-]
Exactly! Surprised that the author didn't mention Bazel anywhere, given that Google is part of the ISO C++ committee, and part of the reason Google created Blaze/Bazel was to address limitations with existing C++ build systems, and now it's used by many large C++ open source projects.
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.
fg137 10 hours ago [-]
Using Cargo is something you don't think about, while using bazel is a serious investment, even with AI. I don't know any C++ project that just decides to adopt Bazel and moves on. That is usually makefile or cmake.
1 days ago [-]
mirmor23 1 days ago [-]
(Ignoring legacy codebases); Even today, for a new project, C++ is likely the only cross-platform option if a rich desktop GUI is critical (EDA/CAD/GIS/Video etc).
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.
roca 23 hours ago [-]
Cross-platform GUI frameworks aren't as important as they used to be, because AI makes it so much easier to implement a GUI once per platform. Write a detailed specification document for how the UI should behave and use your AI agent to vibe-code one implementation per platform using the native platform APIs. Extract common cross-platform logic into a shared library.
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.
sandos 1 days ago [-]
I was surprised when my LLM managed to make a very nice Avalonia app supporting 1M lines of scrollback without any issues.
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 :(
RossBencina 24 hours ago [-]
Definitely agree that the standards committee should stay out of high-level library development and focus on core language features like frame-visible coroutines. Beyond that, I'm not sure the argument about lack of libraries (if that is even a thing) can be blamed on the standards process, although undoubtedly the ISO structure has its impacts. I think it's a broader culture and ecosystem thing: C++ grew up in the world of Bell Labs, and corporate silos that predate modern open-source developer communities. When comparing C++ and Rust the established modes of collaboration, and organizational/community responsibility, seem quite different to me.
ummonk 1 days ago [-]
The flip side of this is that C++ projects are way less vulnerable to supply chain attacks as they lack the massive dependency trees that modern languages like Rust and JS with popular package managers tend to be vulnerable to.
superxpro12 1 days ago [-]
thats only a problem if you set your packages to "latest". working in an embedded shop, the very concept is horrifying.
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.
jillesvangurp 1 days ago [-]
I'm kind of curious to see if somebody will come up with new languages and tools that are optimized for LLM usage. Rust and Go accidentally go in the right direction (strong typing, good development tools, etc.) but they are still optimized for people writing code manually. If you let go of that, the requirements could change.
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.
audunw 1 days ago [-]
Ironically (considering Andrew’s negative attitude to LLMs), I think Zig will be great for AIs once the language is stable.
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 testing
roflcopter69 1 days ago [-]
> Should be said he had a recent shift in stance w.r.t. LLM driven testing
Oh I see! Thank you for digging up the exact timestep.
mike_hearn 1 days ago [-]
That's basically a language like Java or Kotlin. Fast compiles and turnaround times, for Kotlin a pretty strong type system. I don't think Rust is meaningfully more "if it compiles it works", that's a meme and not a real comparison versus the alternatives.
roca 22 hours ago [-]
Java and Kotlin are not the future for two main reasons: GC and startup times. RAM suddenly got more expensive and AI happened, so paying a RAM tax for the ease of programming of GC is much less attractive than it used to be. (This is also a problem for Go.) Static compilation gives you faster startup times, and the AOT solutions for the JVM simply will never work as well as with something like Rust designed for AOT from the ground up.
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.
mike_hearn 12 hours ago [-]
It's not primarily type inference that slows down the Rust compiler unless things changed a lot in the past couple of years, it's more like many decisions aggregated together, like its reliance on generics specialization at compile time and lack of binary ABI stability. Kotlin also does a lot of type inference and compiles much faster, especially now with the new fully AOT compiled compiler it has (which I think demonstrates that it's not genuinely the case that JVM AOT solutions never work). For example it doesn't have to compile dependencies at all, just download them.
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.
roca 9 hours ago [-]
DRAM shortages may or may not last ... but if the industry truly is cyclical, they'll come back and we will have RAM shortages again. That's a merry-go-round I don't want to be on.
Anecdotally, people migrating from Go and the JVM to Rust almost always seem to report reduced memory usage and improved performance. Less anecdotally, papers like "Distilling the Real Cost of Production Garbage Collectors" show that at least as of 2021 supposedly "cutting edge" JVM GC was still really expensive.
The GC tradeoff of space efficiency vs throughput vs low-latency is a bug, not a feature; it's knobs you have to configure and you will never be able to have all three at once. With Rust, if you make reasonable decisions, you will normally be near-optimal in all three.
My latest Rust project is 40K lines of vibe-code, and only calls Arc::new in 14 places because shared ownership is not the default and is rarely needed. This is typical for the Rust projects I've worked on so I don't worry about refcount churn.
mike_hearn 5 hours ago [-]
That's an interesting paper, thanks!
I'm not sure I agree that it's really expensive, though. The paper shows that using normal GC without any tuning has overheads according to their methodology of about 5% to 10%. The much higher numbers come from the pauseless collectors, which in JDK 17 were new, immature and indeed inefficient (hence off by default). I'd expect substantially different numbers for those in recent releases, with similar or better numbers for G1.
But this ~10% CPU overhead or less isn't relative to manual memory management! Instead they subtract STW pauses for non-concurrent collectors from total app runtime, and call that the "intrinsic" cost of an app. So their baseline is some hypothetical impossible to create system which lays objects out in memory perfectly yet does not spend any CPU on memory management at all.
There's another big problem - they disable the JIT compiler ("to reduce measurement noise"). But that means disabling escape analysis and consequent scalar replacement. They do this because it's an academic study, but when comparing real platforms that people would use to build apps, this invalidates the results quite substantially.
Anyway, the overhead that matters is relative to alternative schemes that can actually exist. Google run a custom highly optimized malloc that won't be used by the typical Rust app, yet have reported that CPU overheads on their fleet are on the order of 5%-10%. But that's just direct costs. Fragmentation is studied by [1] and on glibc malloc can have overheads of >2x. This is one reason why the Distilling paper finds the Epsilon no-op GC - that doesn't collect at all - under their methodology often has quite high "overheads".
So in this I'm not seeing a huge gap in costs. Google's workloads and malloc is unusually heavily optimized, yet, their manual memory management overheads are in a similar range to an obsolete version of G1, and when taking into account the improvements from (a) using the latest versions of stuff, (b) turning on a JIT compiler with good escape analysis, (c) taking into account memory wasted to fragmentation and (d) comparing against a malloc realistically used by Rust programs, I think the remaining costs would seem to disappear!
Kind of surprising tbh, I'd always assumed GC costs more but reduces bugs. These papers suggest the gap can easily be small to non-existent, assuming the use of mature GCs.
I work on a C++ project, I use 'vcpkg' for package management. It can also pin packages by basically git commit versions and similarly to cargo, it's source only, though you have to do a lot of CMake busywork to make use of it.
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.
nielsbot 15 hours ago [-]
Maybe the same things that make C++ challenging for humans to code in also make it challenging for LLMs.
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)
Surac 1 days ago [-]
The try to put everything and the kitchen sink into C++ in a most confusing syntax has made me flee to ansi c for performance and c# for luxury. C++ is not needed in my way of coding. Also most c++ are compiler specific and cmake makes everything even more complex
throw93933944 1 days ago [-]
I tried Rust for GUI dev (mainly QT) and quickly gave up. With LLM there is no need to migrate from C++ or Python, I barely read code, and it is memory safe by code audits.
I do not want to fight with half baked alpha quality libraries and bindings.
adrianN 1 days ago [-]
code audits do not make code safe
throw93933944 1 days ago [-]
I replaced borrow checker in rust with small markdown file, code annotations, python script, and LLM pass. It costs $5 per build on 200k lines. I will leave it there.
adrianN 1 days ago [-]
Godspeed
roca 22 hours ago [-]
See my other comment in this article... Cross-platform toolkits aren't as important anymore. LLMs can code per-platform UI implementations based on a shared design document. You get no-compromise truly native UIs without much more work, for reasonably sized apps.
short_sells_poo 1 days ago [-]
Then you are a non-developer and perhaps this is not for you.
fc417fc802 1 days ago [-]
How many developers by your definition do you predict will exist 5 years from now?
throw93933944 1 days ago [-]
Whatever, I maintain old apps within constraints and budget.
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!
arendjr 1 days ago [-]
I tried Rust with Qt too and quickly gave up as well. By that I mean I quickly gave up on Qt, and am using different UI tools with Rust instead.
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.
Kelteseth 1 days ago [-]
So slint?
im3w1l 2 days ago [-]
One approach to consider for C++ would be for the community to adopt nix as the unofficial package manager. I think it could work very well for this. AI is like a gift from heavens for Nix, much more accessible now that you can ask for help with changing your config. And if you are a windows shop, maybe try wsl out its pretty good.
> 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
ajgreengrove 7 hours ago [-]
I'm generally positive towards Nix + AI combo too. Sometimes it's a double-edged sword.
Normally being alert and catching AI "junior engineer" slips is feasible. But 2AM? We've all been there...
If it's easy to output a C++ project's dependency graph then the AI-generated attribute sets could be specific enough.
Not sure how painful C++ build times are with Nix, though.
curt15 1 days ago [-]
Does adopting nix also require subscribing to nixpkgs?
fc417fc802 1 days ago [-]
Theoretically no, but if you don't you will have to package and build the entire world (ie your full toolchain) yourself. So ... actually now that we have AI I guess no, it isn't required. You could realistically turn a model loose to package everything for you and throw it all at CI.
Or you could just use nixpkgs. Is there any particular reason you don't like it?
1 days ago [-]
daemin 1 days ago [-]
Does it support pre-compiled binary packages?
neobrain 1 days ago [-]
Yes, this is supported and actively used in nixpkgs for proprietary programs and for things where maintaining source-builds would be unfeasible.
`patchelf` is the keyword that makes them fit into the nix store system.
im3w1l 1 days ago [-]
I believe so. Ideally they should be prebuilt with nix in mind though.
tucnak 1 days ago [-]
Bazel exists
whizzter 1 days ago [-]
The core we've always fought with is that most *nix tools (both package managers and build tools) cares about "building for home on my machine" (nix does seem to have some separation at least) whilst many developers target crossplatform or multi-targets.
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.
dunno why you were downvoted, I agree with you and really wish this happened.
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.
im3w1l 1 days ago [-]
You could cross compile I guess. I haven't actually tried that though, so I can't speak for how smooth the experience would be.
Gibbon1 1 days ago [-]
Small data point. One time needing a dll for windows. Faced with a build system for that dll that used auto tools. I punted and compiled gcc as a cross compiler to build the windows dll under linux and it worked.
My impression cross compiling C/C++ works fairly well.
softwaredoug 1 days ago [-]
People have said this for 20 years.
I’m curious why? What happened? Why is C++ so dysfunctional when other languages (Python, JavaScript) make progress?
YankeeYahoo 22 hours ago [-]
Honestly? I think it's because C++ has tried to do too many things over the years without a clear vision, and with too many people involved. It's also struggled to effectively integrate changes in technology trends over the years. There's also a large gap between C++ the language and C++ the ecosystem that's not as evident in other languages.
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.
pratzc07 23 hours ago [-]
In AAA game dev C++ is still undisputed and I don't think that will change anytime soon.
pjmlp 10 hours ago [-]
Many studios seem to use it more like Better C than proper C++, though.
ho_schi 22 hours ago [-]
Nobody mentioned Meson?
It makes so much easy, comfortable and safe.
dgan 22 hours ago [-]
but none of mine dependencies ever used it
HeavyStorm 1 days ago [-]
Maybe it's time to move on?
codemastercpp 1 days ago [-]
as much as i love c++, i think this is its time to go to rest
lioeters 1 days ago [-]
It's time to Rust.
darkurge 1 days ago [-]
I do not understand all the fuss to "save" a programming language. If a programming language is not "good" enough will not survive and another will come. What's the problem with that?
empiricus 24 hours ago [-]
The fact the current form of C++ exists in the universe makes me sad.
stackedinserter 6 hours ago [-]
No need to save this sinking and obsolete ship. It has its time and we're grateful for its service, but it's time to move on.
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.
YankeeYahoo 5 hours ago [-]
The pain of trying to manage libraries in Visual Studio was a large part of the reason I happily moved to Linux towards the end of college. 'sudo apt-get install xyz-dev' was so much simpler than trying to pull a new library into Visual Studio. MSYS2 gets you most of the way there on Windows, but you're dealing with the idiosyncrasies of MinGW and no official support for virtually anything.
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.
htfy96 1 days ago [-]
Unfortunately this post was removed from r/cpp due to being marked as AI slop
timedude 1 days ago [-]
Nope vinnie is not very popular among the elite mods there.
20k 1 days ago [-]
Vinnie states that its Ai generated, its not a secret:
The tagline of the website is "My Very Best AI Slop"
steve1977 1 days ago [-]
I mean it's literally in the title of his blog...
(do we still say blog?)
simonask 1 days ago [-]
I wonder if they just took the title of the blog literally, because it doesn't really read as slop to me, but maybe they got too good. Hard to tell.
20k 1 days ago [-]
Vinnie themselves stated that its entirely AI generated
r_lee 1 days ago [-]
You can either wait for all this to be addressed by the 50 C++ ISO committees, where they all come together and start making massive changes in the next year or so as the landscape is moving so fast
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
pjmlp 2 days ago [-]
C++ had a sweet frameworks spot when I learnt, Turbo Vision, Object Windows Framework, MacApp, PowerPlant, CSet++, Motif++, Tools.h++, POET,...
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.
raverbashing 1 days ago [-]
> a thin layer on top of POSIX, with iostreams
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)
pjmlp 1 days ago [-]
iostreams are great, especially when coming from Smalltalk or Object Pascal background, not everyone hates them.
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.
raverbashing 1 days ago [-]
iostreams might have added a familiar interface to some, but see: "how" >> "nobody" >> "else" >> "kept" >> "that"
f-strings won
pjmlp 1 days ago [-]
Actually they have kept it, hence the "when coming from Smalltalk or Object Pascal background", but I guess OOP is not fashionable.
raverbashing 1 days ago [-]
Yes I understood, I meant, nobody kept that after C++
pjmlp 14 hours ago [-]
Java and NET are after C++, with the same streams concept, the only difference is not having funky operators.
Haskell and OCaml are also about the same age, and have type classes, functors, for composable IO, and similar funky operators.
roca 22 hours ago [-]
I never understood why STL was a good idea. Designing everything around iterators that are split into separate start and end values was an obvious mistake.
pjmlp 14 hours ago [-]
STL in general was a good idea, if we compare against the collection classes from Smalltalk and Common Lisp at the time.
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.
1 days ago [-]
drysine 2 days ago [-]
>To this day people are fighting to add into the standard library
Why would anyone want to fossilize libraries they use by codifying them in the standard?
pjmlp 1 days ago [-]
Because in many companies that is the only way around procurement for third party dependencies, there is no cowboy programming "something install".
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.
drysine 10 hours ago [-]
Thanks, I haven't considered this perspective
Still don't think it's a good idea but YMMV
tialaramex 1 days ago [-]
Not just companies. FreeBSD takes C++ in base, and so if you can cram your Rubik's Cube solver into the C++ standard library, maybe just by issuing a new paper proposing the same Rubik's Cube solver for every. single. WG21. meet-up until they relent and add it to the library, now every single FreeBSD install has your Rubik's Cube solver as a core feature. Hilarious.
pjmlp 1 days ago [-]
It works well enough for Python, Go, Java and .NET, batteries included alongside package managers, the problem with C++ is how WG21 happens to be.
tialaramex 1 days ago [-]
I'm intrigued by what you thought your point was here. Is .NET part of the BSD core? Python? Java? No.
For a while FreeBSD tried to have Perl in its core, and what they discovered (as they would with all of the options you suggested) is that "just Perl" wasn't what people wanted - Perl programmers want to be able to add stuff and the whole point of FreeBSD core is that you can't do that, this is all you get. Ironically the result of "No, you can't add a kitchen sink" is that people add the kitchen sink to the C++ stdlib so that they can have a kitchen sink...
pjmlp 11 hours ago [-]
I guess I missed the point then, it is been a while since I have looked into FreeBSD culture.
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.
casept 8 hours ago [-]
Anyone who's had their brain rotted by Claude for a few months can instantly recognize that the article is slop, and more unreadable slop the further you go.
0EveningStudy 7 hours ago [-]
C++ was my first language in high school and I didn't realize how abnormal fighting CMake for hours was until the first time I used cargo add.
3form 1 days ago [-]
Seeing the article title I was wondering, why do we need C++ to become another language like the others?
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.
curt15 1 days ago [-]
That doesn't seem a fair appraisal of
> Adding a library still means forty lines of CMake across three operating systems...
No one wants to struggle with dependency management.
fg137 10 hours ago [-]
> Keep hardening our libraries and shipping independent safety Profiles.
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.
1 days ago [-]
feverzsj 1 days ago [-]
Yet, C++ is still the core language behind every AI/ML framework/system. Musk even said they rewrote Grok with full C++ stack, because "Real men manage their own memory".
roflcopter69 1 days ago [-]
> Musk even said they rewrote Grok with full C++ stack, because "Real men manage their own memory"
RAII and std::shared_ptr left the chat
So real men use C and not C++, right ;) ?
(Gosh this is dumb)
morning-coffee 1 days ago [-]
I feel like this guy went to sleep circa 2018 or so, and is just now waking up. You could see the writing on the wall for C++ back then too, but the cognitive dissonance can be hard to shake.
peterldowns 20 hours ago [-]
Written entirely by AI. Come on man.
cowlevel 1 days ago [-]
Or maybe C++ has run its cycle. Things accumulate cruft over time then they die out and get replaced by one without cruft.
dist-epoch 1 days ago [-]
C++ is the walking dead. Like COBOL, it will live forever, but nothing new will be developed in it.
pjmlp 1 days ago [-]
Depends in what gets to replace CUDA, LLVM, GCC,...
locknitpicker 1 days ago [-]
As a long time professional C and C++ developer, I completely agree with the blogger's sentiment, particularly about Rust's value proposition. Contrary to the talking points parroted by the infamous Rust fanboy community, the borrow checker and vague notions of "security" are not Rust's key feature. What makes Rust stand out is it's improvements in developer experience. Part of this is Rust benefitting from decades of lessons learned in ergonomics and API design, part of it is providing a packaging system that is simple and just works.
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.
gjvc 1 days ago [-]
> If you make people's lives easier, they will use you to solve their problems. There is no merit in making life difficult.
The best (most far-reaching) lessons are the simplest ones, like this.
uecker 15 hours ago [-]
I wonder why you think using distribution package managers sucks? I find the one I use (dpkg/apt/pkg-config) excellent.
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.
TuxSH 1 days ago [-]
> 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.
Almost as if OS/distro package managers were a bad idea in general
icedchai 1 days ago [-]
Do you remember Unix before package managers? I do. I've configured many a SunOS 4.x system from scratch. (It wasn't fun.)
cenamus 1 days ago [-]
So bad that Windows copied them after 25 years
kelseyfrog 1 days ago [-]
It not possible. C++ selects for very opinionated developers. It has to; being picky and choosy about the correct way to write C++ is how C++ devs survive in an environment that is at times actively hostile.
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.
ozgrakkurt 1 days ago [-]
Have you though about just not using C++ for these things and using something else?
z3ratul163071 1 days ago [-]
it will, the committee is asap scheduling to schedule the next meeting as early as summer of 2027. from there on it is smooth sailing with the new standard already ready as early as 2035!
attila-lendvai 2 days ago [-]
i used to know everything about C++... what a waste!
drysine 2 days ago [-]
Nobody knows everything about C++
attila-lendvai 1 days ago [-]
fair enough. still a waste.
kazinator 24 hours ago [-]
Even if OP did, half a year later, they did not.
semiinfinitely 1 days ago [-]
no, c++ needs to die (and fast)
titzer 1 days ago [-]
It's way past time. Technologies come and go. Let it go.
iekeb 1 days ago [-]
Vinnie Falco sounds like the name of a character from Goodfellas.
mac3n 1 days ago [-]
s/Catch Up/Die/
rfgplk 1 days ago [-]
How long until people realize that a) most of these languages are effectively wrappers around LLVM IR b) you can direct LLMs to write directly in LLVM IR, bypassing the frontend parsing stage and c) writing your own custom language/compiler frontend is easier than ever.
tonyhart7 1 days ago [-]
"C++ is the language of AI because PyTorch, TensorRT-LLM, CUDA, and llama.cpp run underneath"
ok, this is sad
chuckadams 1 days ago [-]
Sad, but don't attribute that point to the article, because it goes on to refute it.
topspin 1 days ago [-]
I think an example of non-dysfunctional C++ that supports the arguments in this post has to be what Espressif has done with ESP-IDF. Much of the power of that platform is found in the working package management, endemic CMake, FreeRTOS batteries and uncompromising CLI tooling. These work together smoothly and much of the workflow that the post wishes existed for conventional C++ is found in ESP-IDF. AI absolutely thrives in ESP-IDF.
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." All I know is that if non-embedded C++ worked like that, C++ would be in a much better place.
IshKebab 1 days ago [-]
Let it die.
rob74 1 days ago [-]
To catch up fast or to die slowly - that is the question...
twhitmore 1 days ago [-]
Agreed. After 25+ years the ISO committee still hasn't delivered package management, a coherent standard library, socket networking, memory safety, or sane handling of undefined behavior, and nothing suggests it will before everyone has moved to Rust.
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++.
1 days ago [-]
fukaiall 1 days ago [-]
Yeah lots of high-skilled C++ folks don’t really give a shit about borrow checker or RAII in Rust because they are already familiar with it in C++. It’s the ecosystem and package management part. If those Rust fanboys shut their fuck up then it is the most productive language now.
rramadass 1 days ago [-]
The article only states that the author doesn't like std::execution, thinks coroutines are the bees knees, the tool ecosystem around C++ is not unified (like for Rust) and hence some trouble to setup, some criticisms of the standards committee (everybody has an opinion) and that's it.
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.
karel-3d 1 days ago [-]
Claude, write me a C++ package manager. Make no mistakes
r2vcap 1 days ago [-]
[dead]
Jasonsf737 1 days ago [-]
[dead]
qmplayveil 1 days ago [-]
[dead]
grougnax 5 hours ago [-]
[dead]
qalmakka 1 days ago [-]
[dead]
ingemattsson 22 hours ago [-]
[dead]
brettermeier 1 days ago [-]
I'm glad that C++ always seemed too complex and old-fashioned to me, which is why I never really got into it. People used to think you'd be shooting yourself in the foot by not knowing it, since C++ was the mother of all programming languages. I think it's a good thing that turned out to be not true, and it is nice that no one has to use this outdated stuff for modern projects anymore.
flohofwoe 1 days ago [-]
> People used to think you'd be shooting yourself in the foot by not knowing it, since C++ was the mother of all programming languages.
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.
Woshiwuja 1 days ago [-]
[dead]
motbus3 1 days ago [-]
It is probably a skill issue, but it is much harder to learn c++ today.
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.
mk89 1 days ago [-]
My experience with LLMs: by default they choose Rust (backends, clis, etc.), Javascript (front-end), or Python (scripts, etc). .
It's hard to catch up when new software is vibecoded.
mk89 9 hours ago [-]
This comment got down voted. For what reason? Not clear.
And why wouldn't they? All these languages have quite good error-reporting, linting and static analysis, debugging and runtime introspection features.
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.
samiv 1 days ago [-]
You're right about the compile time. What helps a lot though is (and what I personally do) continuously build while I keep on editing the code. Keep the edits unsaved in the editor buffer as long as the build is still running.
Having small unit test apps that you can build quicker and debug quicker than the "main app" also helps.
tontinton 1 days ago [-]
Or not? who cares about deprecated tech?
dwb 1 days ago [-]
Deprecated by who?
antonvs 1 days ago [-]
Developers who’ve collectively left it behind.
dwb 1 days ago [-]
And what authority or weight do they have? C++ is far from a niche language, however much anyone might want it to be.
antonvs 1 days ago [-]
They reduce the size of the community, which affects the language’s continued success.
Many new projects today have choices available to them that have benefits that C++ can’t match, as the OP article points out.
I moved on from C++ between 2000 and 2010. I used to use it for things like distributed Monte Carlo simulations and other large-scale analytics that needed the speed. I contributed to open source networking libraries and other projects. So the languages loses those kinds of contributions. The situation described in the OP is a kind of consequence of that.
dwb 1 days ago [-]
Sure. That doesn’t support a broad, dismissive declaration of it being “deprecated tech” though.
antonvs 22 hours ago [-]
It’s a provocative way of putting it, but I don’t think it’s indefensible.
adev_ 1 days ago [-]
> who cares about deprecated tech?
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".
TuxSH 1 days ago [-]
Also the Nintendo 3DS and Nintendo Switch 1 and 2.
It's pretty nice for dependency-less monorepos.
WelkinFolk 1 days ago [-]
Tonnes of people do. Some, purely so because they love it.
Strange POV to have towards anything.
rapsey 1 days ago [-]
I think most are bitter for developing skills over decades that have been made irrelevant in Rust based codebases that are becoming ever more popular.
hnav 1 days ago [-]
Knowing C++ is a huge leg up when picking up Rust since you already understand memory ownership. There's also a problem in the Rust community in the sense that a lot of it is dilettantes from the ruby-on-rails world.
feelamee 23 hours ago [-]
so, going further - all tech is deprecated since LLM boom..
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.
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.
> 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.
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.
Incoming: Rust allocators, std::random, std::simd, ByteStr, ByteString, zerocopy (longer term)
Rust just moves far faster than C++ standardization.
https://blog.rust-lang.org/2026/11/12/Rust-1.100.0/
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..
Inline namespaces mean all of those libraries could be replaced/improved in a binary compatible fashion.
There are even C++ features not implemented in VC++, because they would break VC++ ABI in doing so.
I've got no confidence, though, that C++ can make such a change. It's leadership is just too fragmented and has a lot of old leaders that likely don't agree that any of this is a real problem.
And since you'd still be maintaining those old APIs, it's not as if they disappear, they'll still be ever present in libc++. The main difference is that the compiler will reject new code which tries to reach for those old APIs.
Heck, you often can't do things like use C++ classes compiled by GCC 13 in GCC 16. This is the reason the likes of COM [1] exist.
Having editions does not change this reality.
What rust is doing that C++ isn't is frequent releases that change the dynamic semi-regularly. GCC 16 will stick around for a few years and will largely be compatible between minor releases. Rust 1.100 and 1.101 can be completely incompatible if they, for example, bump up the llvm version used under the covers.
[1] https://en.wikipedia.org/wiki/Component_Object_Model
That's patently false.
In practice, there are two extant C++ ABIs, the MSVC ABI (used by, uh, MSVC, and clang when compiling for MSVC compatibility) and the Itanium ABI (used by everybody else). Historically, compilers used their own ABI, but when Intel was pushing hard for Itanium, one of the things they did was make the C++ ABI part of the platform ABI (hence why it's called the Itanium ABI), and since gcc was already looking to tweak their ABI for other reasons, they adopted Itanium ABI for all the architectures in GCC 3, about 25 years ago.
Now, there's definitely going to be bugs if you do weird ABI stuff, especially with compiler extensions in the mix, but you can expect the vast majority of C++ code to be ABI-compatible between, say, GCC 4.1 and GCC 30 and everything in between. (And yes, I'm aware GCC 30 doesn't exist yet.)
Production software that depends on "slow" std::regex or "slow" std::unordered_map or "poor" std::random or <insert your favorite C++ pet peeve>, will, I assure you, under right incentives replace it with their own mechanism at any given time because (1) production cannot wait for the next incantation of std library implementation, (2) production is not a playground for a rolling-wheel like distribution games, and (3) who guarantees that the next version you're waiting for is going to be fit for your problem at hand anyway?
All this break-the-ABI bs really makes no sense for production grade software that runs at scale, and arguably this is all that it matters within this context.
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.
Both are now in the process of being replaced I believe but AI wasn't the enabler, it was finally the will to make it happen on one side and an acquisition of a competitor on the other.
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]
There are occasionally interesting new developments in Fortran, like this https://dl.acm.org/doi/10.1145/3784828.3785257
It’s a domain-specific language at this point.
Atmospheric model that no one wanted to rebuild, due to the obvious complexity.
I've seen a Fortran job in my town and it was work on some government weather system.
So while no one where I work knows Fortran either, we have people who know R and so are dependent on Fortran by association.
(I poked through the Fortran, it seems to be a bunch of accumulated "I got this numerical routine out of an article" stuff.)
This sounds pretty much like a lot of R itself, to be fair.
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.
https://trifectatech.org/initiatives/codegen/
> I'm trying to play with the "k-nucleotide" benchmark, described at https://benchmarksgame-team.pages.debian.net/benchmarksgame/.... Its input and output files, and the current fastest Rust-based implementation, are in this folder. Can you write a faster Rust version?
It came up with this (with no "unsafe"): https://paste.lol/kirk/kn_fast.rs
...with these hyperfine benchmarks:
It's becoming increasingly hard to say "language A is faster than language B", especially when they use the same backend.For extra giggles, I'm telling Fable to make the C++ version faster, too. I wonder how close it'll end up to the Rust version.
There is also C++ Builder, however VCL and Firemonkey are actually implemented in Delphi.
Now if you mean Qt, yeah that is right.
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...
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.
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.
Yes, in theory, the layout of classes with private/public/protected sections is implementation defined, but AFAICT every compiler just puts the members in the order they are declared and they will not suddenly change their rules.
ABI breaks in libraries simply happen when you change the members in a struct or the parameters in an (exported) function. Of course, this can also happen in C libraries!
The only reason why it's not a big problem for the C standard committee is that C barely has a standard library :) But even they occasionally run into ABI break issues, see time_t or intmax_t.
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.
And relatedly, why does Rust require MSVC [0] to interoperate with "C/C++ libraries"? Clearly the MinGW target works with C libraries like user32 (right?) and I thought Rust didn't interoperate with C++ anyway.
[0] https://rust-lang.github.io/rustup/installation/windows.html
And they're generally designed around the indirection and encapsulation needed to ensure that CRT or other internal types are exposed directly over the boundary (assuming that they even use the CRT internally at all) so avoiding the issues of multiple different CRT versions.
You could very much design a c++ interface that behaves similarly, completely encapsulating all types and operations from the API users. Methods are just function calls with specific pointer arguments and funny mangled names. The arguments are as well defined in the ABI as C arguments. It's just most people don't bother as it can be a lot of work, and can sometimes work against what people consider "idiomatic c++", which tends to encourage relying on specific object layout to allow direct offsets, allocation on the stack and similar.
But really my point was there's nothing magic about "C" vs "C++" - just people have put the effort in on the C side to define the interface on many systems. Likley because many of those system we still use today happened to be developed when C was king so ended up using that as a baseline for many things. And then why bother doing the same again for C++ when you already have an interface defined? A second parallel interface seems like a lot of work. There are some OSs that do define their system interfaces in ways that fit C++ more - Symbian for example.
For rust, I suspect that might be because the gcc MSVC ABI implementation is either incomplete or buggy in ways the Rust developers hit. It may be the "System Interface Libraries" mentioned above simply don't have all possible constructs in their interfaces so doesn't care about the implementation being incomplete, but rust does. Or they simply don't trust it to be /entirely/ compatible and don't want the bug reports.
This used to be a much bigger problem, but it really isn't today.
When writing c++, the ISO standard is only one of the many standards you might rely on.
They do not specify that the implementations should be backwards compatible or specify e.g. binary layouts of types, so it is up to the specific implementations (such as gcc & glibc & libstdc++) to guarantee this.
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.
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
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.
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.
The end result is that many C++ projects spend a huge amount of time whenever a dependency is added or updated, so they tend to avoid it and lag behind, leaving performance and bugfixes on the table.
Meanwhile, Cargo even supports linking multiple versions of the same dependency without issue in the same binary. It is lightyears ahead.
Having thousands of transitive dependencies in a super deep dependency graph is bad.
I really like Rust, but I think there's a convincing argument to be made that if you had to manually run 'cargo add' for every dependency, not just the direct ones, its ecosystem would be in a better state. Those transitive dependencies are part of your project. You should be aware of them and have a relationship with them and vet them.
People want results first, optimisation later. This gives them that.
There’s also a good argument to be made that you shouldn’t always give people what they want, but it’s easy to see why Cargo is so popular.
There's a lot we "should" do but don't. That's exactly why I think incentives are so important. When I want to add a Cargo dependency, I should look through every dependency that was added after running 'cargo add' and vet it. But I don't, because it's so easy to not do that.
If I had to run 'cargo add' for each transitive dependency manually, there would be two positive effects:
1. I would be forced to at least be aware of which transitive dependencies I'm adding, I can't just ignore them anymore. This is at least a part of the vetting I should be doing today but don't.
2. It would incentivise libraries to use fewer dependencies, because each one would add extra work for the user. The C++ ecosystem has a ton of those "dependency-free header-only" libraries because both being header-only and being dependency-free makes adoption easier in C++. A similar (though lesser) phenomenon would affect Rust if Cargo made you manually add each transitive dependency.
We're trying to get thing done, here.
You're taking the baffling position that managing dependencies should be hard, tiresome, high-friction.
You're free to suffer on your own, but the rest of us will absolutely move on.
When I use languages that aren't C or C++ I actually audit my dependencies and I don't adopt libraries that would transitively add half a dozen to my project. The result is that I generally can't find acceptable candidates and I end up rolling my own. So I very strongly prefer to remain in the C++ ecosystem where I can check a header only solution into my source tree and just get on with life. (Related, eigen is a work of art.)
But if you really feel you need package management and you can't stomach cmake then consider an agnostic nix-alike or the one that your OS relies on rather than something language specific. Package management should be left to dedicated package managers. I shouldn't need half a dozen different managers pulling from their own centralized repositories.
Custom and out of date code we manually audit is better than packages that can be automatically scanned for known issues.
You can still scan for known issues. Rather than checking version strings in the case of full repos you can check branch names or commit hashes. In the case of individual files you can look at checksums. You can even scan your source tree for known snippets.
People also don't consider that most dependencies suck ass. Not on purpose, but because they're trying to be generic libraries. They have edge-cases and legacy baggage out the wazoo, bugs that will never be fixed for political reasons, and shit tons of code. If you just write it yourself, it's likely you can develop something higher-quality and better suited to your needs with 100x less code. No exaggeration on 100x.
If that's sour grapes then so be it.
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 I wanted a package manager, I'd have to pick between the Microsoft Visual C++ package manager, and Conan. There's no world where I pick the Microsoft Visual C++ one over Conan.
But it happens to be the case that I haven't felt the need for a C++ package manager. I'm happy using a combination of system packages, vendored dependencies, submodules, meson subprojects and meson wrap files.
I do sometimes use Typescript because there's no reasonable alternative and the advantage of having type-checked JavaScript outweighs the downside of using a Microsoft language. So there's that. Every choice has trade-offs.
But if you did that, and your project got some notoriety, and I later decided I wanted a package manager, I would be evaluating your vcpkg hard-fork against Conan and whatever other alternatives would exist and choose the most appealing one. I wouldn't avoid your hypothetical fork just because it'd have commits from Microsoft employees somewhere in its git history.
https://conan.io/
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.
CMake and Meson both support package management. Conan also is a build system as much as a package manager. NPM is a build system, too. The degrees to which they try to pass off responsibility to other tools is why they suck.
> a clean concept of what a "package" is
First mistake: assuming you can define this. Good build systems/package managers don't define this at all, nor should they. It's natural for software developers to want to put limits here and try and box things in but it just makes life harder for everyone.
A build system orders individual operations that take inputs and yield outputs. That's it. This is what Make got right.
Package management is just an extension of that.
> a build system does not need to know how to download packages
Downloading is trivial. The actual package management part is checking hashes, version unification, and handling updates.
There's just no argument to me that these need to be separate tools, when bad tools wind up doing the same work poorly.
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.
And it was a separate installation from Visual Studio for a long time as well.
It's still hell. And vcpkg is definitely not the hottest place in it.
Seems I should actually give it a try. Thanks!
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
In fact, the official position thus far, is to use Verse FFI for those that wish to keep gameplay code in C++.
> for games, probably it'll be hidden behind FFI, like a lot of it already is like in the ML space
?
Going forward instead of directly making use of Unreal Engine's Gameplay Framework for C++ projects on Visual Studio, one needs to create a wrapper library, in pure C++ code logic, to be consumed by Verse Scene Graph.
Also having to use two debugging environments, when trying to find if the bug is on Verse side, or C++ side, coupled with a more complex build pipeline approach.
Hardly the same thing.
Julia and Mojo were designed exactly by folks that had enough of writing CPython FFI.
But I expect Rust or something else will make substantial inroads. I think a big part of C++'s dominance is just inertia.
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 .
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.
Still looking forward to meeting this mythical Rust Evangelism Strike Force. I keep hearing about how prolific and intrusive they are, yet somehow they seem to have left the room just before anyone sees them, every time. It's curious.
Or how they managed to push ThePhd and Actix-Web original author away from the community.
The WG14 and C has a lot to thank for having ThePhd refocus on C.
People writing about their Rust project counts as toxic evangelism now? I swear, some people seem to receive any mention of Rust as a personal attack.
> Or how they managed to push ThePhd and Actix-Web original author away from the community.
You're referencing community drama from half a decade ago. A lot has been written about both of those situations, but I'm not sure how it's relevant today. For the record, I think we all agree that both situations were tragic and had an unacceptable human cost, regardless of any technical merit of the criticisms raised.
While the level of hate the Actix Web author got was excessive, and I respect their contributions to the open source community, their position was genuinely kind of absurd.
On one hand it was being proudly declared and advertised as production-ready and used by his employer (Microsoft). On the other hand, when a safety issue was reported:
* First it was dismissed as not a real issue and exploiting unsafe was required for performance / because it was a fun hobby project for them
* When it was proved to be a real issue with a reproducer, and a fix was submitted that used no unsafe and yet did not regress performance, the PR was closed with the statement "this patch is boring". Like there was nothing actually wrong with the patch, it just wasn't "fun" enough as opposed to using unsafe code incorrectly.
If it was advertised as a hobby project in the first place, people would just move on to something else. But when it is advertised as being a serious project, gains adoption on that basis and then isn't treated seriously when real issues show up, I don't think it's unreasonable to get upset about the misrepresentation.
The degree to which some people got upset was a bit crazy though. Obviously death threats (alleged) are bad.
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 :)
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.
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.
That's exactly what I did with 'Jobs' except the github transpiling, but it came up with a good enough language with examples and everything. So yes AI can do it, will do it and some already started
[1] https://github.com/kuyawa/jobs-lang
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.
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
> 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.
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.
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
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.
The best research i know on the (admittedly understudied) subject is by Dan Luu: https://danluu.com/pl-tokens/ and subsequent articles.
- 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 :(
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.
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.
Anecdotally, people migrating from Go and the JVM to Rust almost always seem to report reduced memory usage and improved performance. Less anecdotally, papers like "Distilling the Real Cost of Production Garbage Collectors" show that at least as of 2021 supposedly "cutting edge" JVM GC was still really expensive.
The GC tradeoff of space efficiency vs throughput vs low-latency is a bug, not a feature; it's knobs you have to configure and you will never be able to have all three at once. With Rust, if you make reasonable decisions, you will normally be near-optimal in all three.
My latest Rust project is 40K lines of vibe-code, and only calls Arc::new in 14 places because shared ownership is not the default and is rarely needed. This is typical for the Rust projects I've worked on so I don't worry about refcount churn.
I'm not sure I agree that it's really expensive, though. The paper shows that using normal GC without any tuning has overheads according to their methodology of about 5% to 10%. The much higher numbers come from the pauseless collectors, which in JDK 17 were new, immature and indeed inefficient (hence off by default). I'd expect substantially different numbers for those in recent releases, with similar or better numbers for G1.
But this ~10% CPU overhead or less isn't relative to manual memory management! Instead they subtract STW pauses for non-concurrent collectors from total app runtime, and call that the "intrinsic" cost of an app. So their baseline is some hypothetical impossible to create system which lays objects out in memory perfectly yet does not spend any CPU on memory management at all.
There's another big problem - they disable the JIT compiler ("to reduce measurement noise"). But that means disabling escape analysis and consequent scalar replacement. They do this because it's an academic study, but when comparing real platforms that people would use to build apps, this invalidates the results quite substantially.
Anyway, the overhead that matters is relative to alternative schemes that can actually exist. Google run a custom highly optimized malloc that won't be used by the typical Rust app, yet have reported that CPU overheads on their fleet are on the order of 5%-10%. But that's just direct costs. Fragmentation is studied by [1] and on glibc malloc can have overheads of >2x. This is one reason why the Distilling paper finds the Epsilon no-op GC - that doesn't collect at all - under their methodology often has quite high "overheads".
So in this I'm not seeing a huge gap in costs. Google's workloads and malloc is unusually heavily optimized, yet, their manual memory management overheads are in a similar range to an obsolete version of G1, and when taking into account the improvements from (a) using the latest versions of stuff, (b) turning on a JIT compiler with good escape analysis, (c) taking into account memory wasted to fragmentation and (d) comparing against a malloc realistically used by Rust programs, I think the remaining costs would seem to disappear!
Kind of surprising tbh, I'd always assumed GC costs more but reduces bugs. These papers suggest the gap can easily be small to non-existent, assuming the use of mature GCs.
[1] https://arxiv.org/pdf/2605.17119
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.
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)
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.
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.
It makes so much easy, comfortable and safe.
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.
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?)
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
Haskell and OCaml are also about the same age, and have type classes, functors, for composable IO, and similar funky operators.
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
For a while FreeBSD tried to have Perl in its core, and what they discovered (as they would with all of the options you suggested) is that "just Perl" wasn't what people wanted - Perl programmers want to be able to add stuff and the whole point of FreeBSD core is that you can't do that, this is all you get. Ironically the result of "No, you can't add a kitchen sink" is that people add the kitchen sink to the C++ stdlib so that they can have a kitchen sink...
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.
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.
> Adding a library still means forty lines of CMake across three operating systems...
No one wants to struggle with dependency management.
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.
RAII and std::shared_ptr left the chat
So real men use C and not C++, right ;) ?
(Gosh this is dumb)
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.
The best (most far-reaching) lessons are the simplest ones, like this.
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
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.
ok, this is sad
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." All I know is that if non-embedded C++ worked like that, C++ would be in a much better place.
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++.
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.
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.
There is even evidence about it, which kind of confirms what I have seen in the last 2 years: https://x.com/brunoborges/status/2127773519882690739
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.
Having small unit test apps that you can build quicker and debug quicker than the "main app" also helps.
Many new projects today have choices available to them that have benefits that C++ can’t match, as the OP article points out.
I moved on from C++ between 2000 and 2010. I used to use it for things like distributed Monte Carlo simulations and other large-scale analytics that needed the speed. I contributed to open source networking libraries and other projects. So the languages loses those kinds of contributions. The situation described in the OP is a kind of consequence of that.
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.