Live data from Hacker News

C++26 is done: ISO C++ standards meeting Trip Report

herbsutter.com

41–50 of 437 posts

Re: C++26 is done: ISO C++ standards meeting Trip Report

#41

[flagged]

Please don't use Hacker News as a religious or ideological battleground. It tramples curiosity. Please don't pick the most religiously/ideologically provocative thing in an article or post to complain about in the thread. Find something interesting to respond to instead.

Re: C++26 is done: ISO C++ standards meeting Trip Report

#43

[flagged]

Please don't use Hacker News as a religious or ideological battleground. It tramples curiosity. Please don't pick the most religiously/ideologically provocative thing in an article or post to complain about in the thread. Find something interesting to respond to instead.

This is interesting! People ignoring this, I think, is also interesting on its own. I respect if other people disagree, but that's my 2c. I think our overton windows may not agree here, but I think this is part of the value of discussions with other humans.

Are you a moderator? The directive tone of this post is as if from an authority figure, but, but I do not believe you are one.

I do not believe there is anything about a religious or ideological background here. Could you please clarify?

I also believe it is your post that could be more accurately described as trampling curiosity; I believe there is a role reversal, in that I think your comment is a better description for trampling curiosity than the post your are responding. I'm not trying to be snarky - I'm curious how you came to those conclusions.

Re: C++26 is done: ISO C++ standards meeting Trip Report

#44

Earlier quoted context omitted.

No. Modules are a failed idea. Really really hard for me to see them becoming mainstream at this point.

The idea is great, the execution is terrible. In JS, modules were instantly popular because they were easy to use, added a lot of benefit, and support in browsers and the ecoysystem was fairly good after a couple of years. In C++, support is still bad, 6 years after they were introduced.

Exactly. C++ is still waiting for its "uv" moment, so until then modules aren't even close to solved.

Re: C++26 is done: ISO C++ standards meeting Trip Report

#45
post #7

Biggest open question is whether the small changes to the module system in this standard will actually lead to more widespread adoption

The best thing the C++ WG could do is to spend an entire release cycle working on modules and packaging. It's nice to have new features, but what is really killing C++ is Cargo. I don't think a new generation of developers are going to be inspired to learn a language where you can't simply `cargo add` whatever you need and instead have to go through hell to use a dependency.

To me, the most important feature of Cargo isn't even the dependency management but that I don't ever need to tell it which files to compile or where to find them. The fact that it knows to look for lib.rs or main.rs in src and then recursively find all my other modules without me needing to specify targets or anything like that is a killer feature on its own IMO. Over the past couple of years I've tried to clone and build a number of dotnet packages for various things, but for an ecosystem that's supposedly cross-platform, almost none of them seem to just work by default when I run `dotnet build` and instead require at least some fixes in the various project files. I don't think I've ever had an issue with a Rust project, and it's hard not to feel like a big part of that is because there's not really much configuration to be done. The list of dependencies is just about the only thing in there that effects the default build; if there's any other configuration other than that and the basic metadata like the name, the repo link, the license, etc., it almost always will end up being specifically for alternate builds (like extra options for release builds, alternate features that can be compiled in, etc.).

Re: C++26 is done: ISO C++ standards meeting Trip Report

#46
post #11

I am somewhat dismayed that contracts were accepted. It feels like piling on ever more complexity to a language which has already surpassed its complexity budget, and given that the feature comes with its own set of footguns I'm not sure that it is justified. Here's a quote from Bjarne, > So go back about one year, and we could vote about it before it got into the standard, and some of us voted no. Now we have a much…

C++ contracts standardizes what people already do in C++. Where is the complexity in that? It removes the need to write your own implementation because the language provides a standard interoperable one.

An argument can be made that C++26 features like reflection add complexity but I don't follow that argument for contracts.

Re: C++26 is done: ISO C++ standards meeting Trip Report

#47
post #6

Finally, reflection has arrived, five years after I last touched a line in c++. I wonder how long would it take the committee, if ever, to introduce destructing move.

Yeah I feel the same way. Lots of nice features that would have been helpful 5 years ago before I switched to Rust.

Re: C++26 is done: ISO C++ standards meeting Trip Report

#48
post #27
post #7

Earlier quoted context omitted.

The best thing the C++ WG could do is to spend an entire release cycle working on modules and packaging. It's nice to have new features, but what is really killing C++ is Cargo. I don't think a new generation of developers are going to be inspired to learn a language where you can't simply `cargo add` whatever you need and instead have to go through hell to use a dependency.

I’m still surprised how people ignore Meson. Please test it :) https://mesonbuild.com/ And Mesons awesome dependency handling: https://mesonbuild.com/Dependencies.html https://mesonbuild.com/Using-the-WrapDB.html#using-the-wrapd... https://nibblestew.blogspot.com/2026/02/c-and-c-dependencies... I suffered with Java from Any, Maven and Gradle (the oldest is the the best). After reading about GNU Autotools I was wonder…

Build system generators (like Meson, autotools, CMake or any other one) can't solve programming language module and packaging problems, even in principle. So, it's not clear what your argument is here.

> I’m still surprised how people ignore Meson. Please test it :)

I did just that a few years ago and found it rather inconvenient and inflexible, so I went back to ignoring it. But YMMV I suppose.

> After reading about GNU Autotools

Consider Kitware's CMake.

Re: C++26 is done: ISO C++ standards meeting Trip Report

#49
The "erroneous behavior" redefinition for reads of uninitialized variables is really interesting: https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2024/p27...

It does have a runtime cost. There's an attribute to force undefined behavior on read again and avoid the cost:

    int x [[indeterminate]];
    std::cin >> x;

Re: C++26 is done: ISO C++ standards meeting Trip Report

#50
Contracts feel like the right direction but the wrong execution timeline. The Ada/SPARK model shows how powerful contracts become when they feed into static verification — but that took decades of iteration on a language with far cleaner semantics. Bolting that onto C++ where UB is load-bearing infrastructure is a different beast entirely. The real risk isn't complexity for complexity's sake — it's that a "minimum viable" contracts spec gets locked in, and then the things that would actually make it useful for proof assistants become impossible to retrofit because they'd break the v1 semantics. Bjarne's concern about "incomplete" is more worrying to me than "bloated."
Post reply on HN