logoalt Hacker News

C++26 is done (again): ISO C++ meeting trip report

136 points • by dverlaeckt80 • last Sunday at 3:59 PM • 176 comments • view on HN

Comments

zarzavat • last Sunday at 9:35 PM

I have no particular opinion on contracts per se, but I do think that the C++ committee is procrastinating by focusing on niche features like contracts instead of dealing with the urgent issues (namely packaging and memory safety) where C++ is losing to Rust.

The rejection was a moment for them to reevaluate their priorities but it doesn't seem that they've gotten the message.

➕ show 11 replies
vhantz • yesterday at 12:25 AM

They should have removed contracts and kept it in the C++29 draft. There are clearly serious concerns being papered over with a vote count. And that vote count is really not different from the previous ones so essentially "we analyzed our proposal and found we did nothing wrong". Plus there are other more elegant proposals for contracts that this closes the door on. Even if a decade was already spent on getting to this point, it's a mistake to rush this.

There really is a smaller, more beautiful language within C++ getting smothered by committee design, despite Bjarne's wishes.

➕ show 2 replies
Panzerschrek • yesterday at 4:53 AM

> Adopted this week for draft C++29: break label; continue label;,

Something is terribly-wrong with the standardization committee if such useful feature as labeled loops (proven to work fine in other languages for decades) are still not in the standard, but questionable things like std::regex or contracts are.

➕ show 1 reply
omoikane • today at 12:57 AM

> P0085R5 “Oo… adding a coherent character sequence to begin octal-literals”

Deprecating 0-prefix octal literals is probably setting up many popular repositories for cleanup churn.

https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2026/p00...

Seems like if a piece of code wants to compile free of diagnostics before and after C++29, it will need to avoid octal literals altogether, or maybe select the octal literal based on `__cplusplus` version, both seem ugly.

➕ show 1 reply
bozdemir • today at 3:50 AM

This committee is the reason why Rust exists.

➕ show 1 reply
throwaway132448 • today at 9:47 AM

What would be the downsides of just not having a new C++ version for a while? Let the compilers and the users catch up. Take some time to reflect. The constant addition of features feels like busy work.

grg0 • last Sunday at 9:31 PM

> pre<std::contracts::controls::enforced>(x > 0)

Ho-lee, guys. We just needed pre(x > 0)

➕ show 5 replies
WalterBright • today at 5:16 AM

> Adopted this week for draft C++29: break label; continue label;

Nearly 30 years after D:

https://dlang.org/spec/statement.html#continue-statement

smallstepforman • today at 10:00 AM

I’m get downvoted to hell, but we’re nearing AI armaggedon, and frankly all languages not designed for AI are dead man walking. I dont think anyone will actually use a working C++26 compiler, ever. And I do many core Vulkan engine drivers for a living …

jcranmer • last Sunday at 11:00 PM

I'll say this about WG21: the C++ standardization process is definitely deeply broken. And yet one of the most frustrating things is... for all of the deeply problematic stuff coming out of C++, contracts is one of the features that actually doesn't suffer from WG21's dysfunction!

The problem with contracts is that everyone has a slightly different notion of what contracts is supposed to solve, and it took years (really, over a decade) to come a consensus that almost everybody was happy with. Except for a small, vocal minority who are so upset over contracts that they're willing to spike the entire process to kill it. While this trip report is putting a positive spin on it, if you look at the dissenting vote counts in the plenary votes, they're not really going down, and I'm dubious that any of the dissenters were actually mollified by the latest changes. My suspicion is that C++26 NB balloting round 2 will come back the same way--failure, just with a couple thousand extra man-hours wasted on debating it.

As for why WG21 is so broken, well, I hope you'll forgive me a bit of rant:

It was one of the papers I was listening to during this meeting, about a new proposed standard library feature. And as the author is droning on about how good their implementation is, thanks to their thousands of lines of inline assembly, I just wanted to stop and shout at them "I don't give a flying fuck about your implementation." When you propose adding something to the C++ standard library, it's not your implementation that's going to be added. No, each of the standard libraries is going to reimplement it themselves because they have to--and given that all of their maintainers seem to be running on the ragged edge of burnout because the new library additions just keep coming, it's probably going to be the minimum work necessary to get something working.

And yet every library paper author comes in with their wistful stories of how good their implementation is, how nice it would be if everyone could take advantage of their work, and of course, since it's in the standard library, you get the best possible implementation, as if <linalg> is going to be implemented by a BLAS expert who's been studying it for 30 years and not some guy who hasn't touched numerics in 30 years but needs to check off a C++26 feature. Or hey, maybe even the compiler will get super special awesome sauce for optimization for the feature, because obviously that kind of integration is just free, right?

And yet... you just can't actually bring any of this stuff up to the committee. WG21 is so compartmentalized that trying to bring it up in any room is going to just result in "that's not relevant for this vote, bring it up in <insert study group here>." The only thing you can do is be a curmudgeon who votes against everything because it's really poorly motivated, and yet you'll be outvoted by everybody else who is bringing their own library features into the standard, which all of the same flaws and thus their authors are equally blind to the issues, so they'll vote in favor because it sounds like a really cool thing to add.

➕ show 1 reply
rramadass • today at 5:49 AM

Relevant to understanding the real-world benefits from usage of "contracts";

Catching Bugs Early: Validating C++ Contracts with Static Analysis - https://news.ycombinator.com/item?id=50379283

npalli • last Sunday at 9:32 PM

LOL. The C++26 gloom and doom last month was something else. C++ was finished (not just C++26, mind you), and everyone should pack their bags and move to Rust.

Meanwhile, back in reality, the committee did its job: it addressed the NB comments, kept contracts, and C++26 is back on track. Imagine that.

➕ show 4 replies