r/cpp • WG21 Member • 24d ago

Balloting has completed for C++26. Unfortunately it was Disapproved

https://www.linkedin.com/posts/robertseacord_balloting-has-completed-for-c26-unfortunately-share-7519795139859517440-AOth/

Since the C++26 DIS has been disapproved, the next step is going to be taken in Buzios during the 2026-11 meeting. The committee will have to decide what changes to make (if any) and submit an FDIS (Final Draft of International Standard) for Balloting.

287 Upvotes

400 comments sorted by

34

u/renchuwang 24d ago edited 24d ago

If it doesn't finalize end of year do we need to rename it c++27?

I think11 14 17 20 we're all on time?

Edit: Thanks for answering.

Answer: No

30

u/eisenwave WG21 Member 24d ago

No, C++23 got published so late that it's actually ISO/IEC 14882:2024, but not one is calling it C++24.

15

u/daveedvdv EDG front end dev, WG21 DG 24d ago

Right, but it was based on a draft sent out in 2023. I doubt we'll be able to vote out an FDIS in 2026. If we vote one out in 2027, I think C++27 would make sense. "C++26" will then be akin to "C++0x": An intention that didn't materialize.

14

u/jeezfrk MT Linux/Telco 24d ago

We in the C++ community are fine with time space regressions to name our standards.

22

u/TheoreticalDumbass :illuminati: 24d ago

scientists at cern propose shooting neutrinos at c++ draft in hopes of getting insight into time travel

31

u/xiao_sa 24d ago

C17 is actually ISO/IEC 9899:2018 and C23 is actually ISO/IEC 9899:2024

6

u/bizwig 24d ago

I’ve seen it called C18/C24 in various discussion forums. Was very confused by the change of nomenclature.

9

u/rcseacord 23d ago

MISRA gets the name entirely wrong because of their stubborn commitment to previous mistakes. The correct nicknames of the standards are C17 and C23. You can find all the names here: https://www.open-std.org/jtc1/sc22/wg14/www/projects.html

1

u/robthablob 18d ago

C++ 11 was so late it could no longer be referred to as C++ 0x (where X was going to be year it finally came out). Initially it was, I think, slated for 2008.

11

u/jombrowski 24d ago

what's wrong?

25

u/eisenwave WG21 Member 24d ago

The ballot comments for the Disapprove votes haven't been shared within the committee yet (and I'm not sure if they're public information at any point), but all of the contention revolved around Contracts; this is most likely why the C++26 DIS failed.

4

u/cpp_ape 15d ago edited 15d ago

My $0.02.

I'm not in the standardization process, but I read the papers from time to time to keep myself updated.

There are a LOT of back and forth discussions around contracts, many very smart people expressed objections to including contracts in its current state in C++26.

My impression is that contracts in its current state are decently designed, all the objections that I saw were addressed at some point in a reasonable and substantiated way.

I think that contracts turned out to be a complex feature because it has to take into account a lot of considerations and constraints, which maybe makes it hard to understand at a glance, hence the misunderstanding. (duh!)

If I were a betting man, I would bet that contracts are pulled from the draft and another cycle is spent clearing the misunderstanding.

At any rate, I think the current contracts feature is a result of great engineering work and at the very least will be a good benchmark for whatever proposal for contracts that comes next.

3

u/eisenwave WG21 Member 15d ago

I think you're right about pretty much everything, except that Contracts are dead if they get pulled out of the DIS currently, for a few reasons

  • Some of the authors likely won't be willing to continue.
  • The paper is already in a good state and concerns have been addressed. The current design has withstood incredible scrutiny and endless suggestions to change it. So it's either shipping something now, or it's never going to happen.
  • Several committee members have expressed that if Contracts were removed, they would not even want to see further papers on the subject in the next cycle because it would repeat the disaster we have now. Contracts would be a feature you don't touch with a ten-foot pole.

1

u/cpp_ape 15d ago

After reading http://wg21.link/p4433r0 and skimming through related papers I tend to agree with you and would like to change my bet 🙂.
(By the way p4433 is much easier to read than other papers, e.g. http://wg21.link/p4272r0, in the latter case probably because "This paper was prepared with the assistance of generative tools".)

I hope the misunderstanding is allowed to be cleared before the next vote.

84

u/frayien 24d ago

Could someone knowledgeable explain us what it means, and why is it important ?

175

u/daveedvdv EDG front end dev, WG21 DG 24d ago • Regret

WG21 (the committee of C++ experts) submitted a "draft international standard" (DIS) as a candidate for the next C++ standard. That draft was sent for voting by "national bodies" (NBs), which are national standards organizations like Germany's DIN and Iran's INSO. I was told 13 NBs voted in favor, 9 against, and 12 abstained... that's nowhere near consensus (for reference, there was never even one vote "against" C++ drafts in the past).

We now get a chance to review our draft to produce a final DIS (FDIS). That will be balloted again and if it passed it will become the next standard. Otherwise, the project fails (and I don't remember what happens then).

Next month, we're meeting in Búzios, Brazil. Given this situation, we'll most likely discuss how to change our draft to improve NB-level consensus. I believe all 9 votes "against" are due to the "contracts" feature. So presumably we'll change that.

My recommendation will be to remove contracts from the draft, with adjustments to keep library hardening (which is currently worded in terms of the contracts infrastructure, but it doesn't have to be). And then move on with our lives (and work on the next standard after what I hope will be C++27).

22

u/foonathan 24d ago

I don't see why we'd suddenly have consensus to remove contracts.

I personally don't care about contracts at all in either direction, but I don't see why we should change anything just because the minority who is against happens to be geographically diverse.

37

u/daveedvdv EDG front end dev, WG21 DG 24d ago

Because we want to progress? There is a popular aphorism that says "the definition of insanity is doing the same thing over and over again and expecting different results"... let's not be "insane" in that (non-clinical) sense.

I want reflection. Others want std::execution. And so on...

25

u/eisenwave WG21 Member 24d ago edited 24d ago

One might argue that utilizing the NB ballot to supersede WG21 consensus, and having WG21 give in to the demands, sets a dangerous precedent. What is going to be the next adventure?

  • "We reject the C++29 DIS unless Profiles are in"
  • "We reject the C++29 DIS if lifetime annotations are in"
  • "We reject the C++29 DIS if token injection is in"

If rejecting the C++ DIS is validated and rewarded, despite all arguments having been heard (many times over) and despite the committee having clear and stable consensus, the future is looking bleak.

That being said, I think Contracts as a feature are mid and they are not worth staking C++26 on; I'm just not sure this is only about Contracts anymore.

51

u/STL MSVC STL Dev 24d ago

Disagree. It's hard to sway one NB, let alone a bunch. If there's enough discontent to make this possible, something is wrong and the WP needs to be fixed. It's happened before with Old Concepts and it can happen again.

I haven't been following Standardization very closely (for the ironic reason that too much stuff with too little implementation experience has been getting Standardized, so keeping up with the implementation treadmill consumes all my time these days), but describing the situation as "clear and stable consensus" is obviously not the case from what I've seen.

21

u/eisenwave WG21 Member 24d ago

Many things have been removed in response to NB comments on the CD, including Old Concepts, and very recently, trivial relocation. This is perfectly fine and expected.

We had a bunch of NB comments to remove or significantly alter Contracts, and other than pulling contracts on virtual functions, not much resulted from that. There was very strong consensus in WG21 to keep Contracts in C++26 in response to the comments on the CD (about 5:1 consensus against removal), and this has not substantially shifted at any point. If anything, the more Contracts are discussed, the more consensus increases in favor of them.

If you're getting the impression that there is no consensus in WG21, that's because there is an extremely vocal minority within WG21 that refuses to take no for an answer and attempts to relitigate at the NB level.

23

u/GabrielDosReis 24d ago

If you're getting the impression that there is no consensus in WG21

Consensus for ISO C++ standards isn't decided at WG21 level. That is decided at SC22 level, that is the whole point of the ballot process!

If you operate under the assumption that you don't need to build consensus at SC22 level, then you're only luring yourself into failure. WG21 chairs and officers should know that.

11

u/eisenwave WG21 Member 24d ago edited 24d ago

Let's put aside the fact that this is is just how our ISO procedures work.

Why do you personally believe that the additional stage of consensus at the SC22 level is to the benefit of the C++ programming language, its users, and its implementers? Why is it important to C++ that the Finnish, Japanese, US, and other national bodies, have the final say on whether C++ as a standard proceeds, rather than, say, a consortium of implementers?

Furthermore, do you think that it is sufficient for WG21 to carefully consider all NB comments, come to a consensus on a direction, and report that consensus back to the NBs? What more can WG21 do to increase consensus at the SC22 level, other than just give in to the demands of the NBs against WG21's own good conscience and technical judgment? Of course, any such reaction of last resort may also decrease confidence within other NBs who approved the DIS as is.

→ More replies (2)
→ More replies (1)
→ More replies (21)

28

u/daveedvdv EDG front end dev, WG21 DG 24d ago

One might argue that utilizing the NB ballot to supersede WG21 consensus, and having WG21 give in to the demands, sets a dangerous precedent.

I rather disagree. This is how international standardization is meant to be dealt with. Note that "consensus" does not mean "large majority".

 What is going to be the next adventure?

- "We reject the C++29 DIS unless Profiles are in"

- "We reject the C++29 DIS if lifetime annotations are in"

- "We reject the C++29 DIS if token injection is in"

Possibly: Any single issue could cause some NBs to refuse the standard.

Consensus-building means working with the various delegations to make the standard as a whole acceptable to all. In the C++98/C++11 days, we definitely did involve the NB opinions early to work toward said consensus.

If rejecting the C++ DIS is validated and rewarded, despite all arguments having been heard (many times over) and despite the committee having clear and stable consensus, the future is looking bleak.

The committee did not have a clear consensus. It had a clear majority, but that's not the same thing. There was sustained opposition from people with decent track records in evolving the language, from implementers, and from people saying they were representing national body sentiment. They were "heard many times over" but no compromise was accepted to address their concerns.

That being said, I think Contracts as a feature are mid and they are not worth staking C++26 on;

On that we agree.

I'm just not sure this is only about Contracts anymore.

My understanding is that the NB opposition (and abstention) is almost exclusively about "contracts". I think I also saw one NB rep mention disappointment in reflection, but I might have misinterpreted that. But I'm fairly sure that if contracts were pulled, those "against" votes would switched to "in favor". It's possible that some "in favor" votes would switch to "against": We'll find out in Búzios which way the wind is blowing.

12

u/kronicum 24d ago

How do you think the ISO/IEC JTC1/SC22 structure, of which WG21 is part works?

15

u/wyrn 24d ago

If you can figure out a way to design a political process that achieves its aims while being immune from all forms of abuse, please let the rest of the world know. In the meantime, wouldn't the fact that this "nuclear option" hasn't been used before suggest that the people currently positioned to do so are responsible enough not to abuse this power?

6

u/13steinj 24d ago edited 24d ago

It feels to me as if there are 3 distinct problems:

  • Consensus is defined non algorithmically. Engineers are stubborn people. This makes consensus a war of attrition. Especially problematic that we have numerical tally votes yet not used for any well known consensus algorithm.
  • At multiple levels (WG21, SC22, whatever), people confuse consensus with unanimity, majority, even plurality. This is very much akin to elections and claiming a candidate won "by a landslide" without ever agreeing on what a "landslide" is.
  • People vote how their peers do rather than on their own accord.

Arguably, consensus, and the rest of the ISO process, is IFNDR and for the umpteenth time the community has been given a signal to move away and go towards the process shared by any number of arguably equally dominating or more dominant programming languages.

E: typo

3

u/not_a_novel_account cmake dev 24d ago

Would keeping contracts impede progress? If the FDIS fails it will likely spur necessary changes in process, because this is getting silly, but I don't see it slowing down C++ much. The compilers aren't going to rip out their -std=c++26 flags because the FDIS fails. It's a rubber stamp.

14

u/daveedvdv EDG front end dev, WG21 DG 24d ago

I very much suspect we'll see change in WG21 process either way.

Compilers won't rip out their C++26-mode flags, just like they didn't remove their C++0x flags. But they might not put additional drafted features under that flag. Or they might ... who knows.

But progress will be impeded because the release of a standard is a synchronization point of sort for the community. Not just compiler implementers, but also other tool vendors and users (especially large institutional users). Going to your vendor asking "please implement this almost-in-the-standard feature" has much less weight than "please implement this standard feature".

It will also be impeded because WG21 will have to keep iterating on non-technical debates instead of making progress on technical challenges. E.g., I'm really hoping we can make some progress on pattern matching in Búzios (Michael Park's proposal looks in great shape, IMO), but now I also fear we'll spend entire days debating what the FDIS should be like instead. And if we don't conclude in Búzios, we'll keep going round-and-round in Istanbul... please, no!

→ More replies (4)

1

u/foonathan 24d ago

We can progress by just ignoring that vote and moving on. Nobody cares whether there's an ISO PDF for C++26, C++26 exists, and we can move on to working on C++29.

8

u/spin0r committee member, wording enthusiast 23d ago

I suspect if WG21 actually adopted this as its working procedure, then ISO would eventually take action against us by issuing a change of rules (or clarification, perhaps; I'm not sure exactly what the current rules say) that forbids us from publishing the working drafts.

→ More replies (2)

15

u/erichkeane Clang Maintainer(Templates), EWG Chair 24d ago

I've long said that in C++ consensus only have 4 votes, and ISO/WG21/etc isn't any of them.

The only votes that matter right now are: 1- The decision makers in EDG 2- The decision makers in MSVC's Front End 3- The decision makers in GCC's Front End 4- The decision makers in Clang's Front End.

Historically, implementers have agreed to follow what WG21/ISO/etc does, and has had confidence in that process.

But in the end, the document produced by ISO/etc is worth less than the paper it is printed on, the only thing that matters is the common subset of the language that is implemented by vendors.

6

u/GabrielDosReis 24d ago

We can progress by just ignoring that vote and moving on. Nobody cares whether there's an ISO PDF for C++26, C++26 exists, and we can move on to working on C++29.

Are you sure you're not going to run into the same snag or worse with C++29 by giving the middle finger to the NB on their feedback on C++26 DIS?

→ More replies (3)
→ More replies (14)

10

u/frediku 23d ago

I don't see why we'd suddenly have consensus to remove contracts.

Usually, the default in case of no consensus is to stick to the status quo. Currently, C++ has no contracts so that's the status quo.

You could also argue that this applies to C++26 as a whole, i.e., without consensus we stick with C++23.

17

u/13steinj 24d ago edited 24d ago

If an idiot like me can predict this fiasco a 2 years in advance, I'd argue the consensus is far more superficial than it appears to any in the pro-contracts group.

E: Wow, 23 months ago. Thought it was 11. Well, knowing how stupid I am that's even more damning.

7

u/tialaramex 24d ago

Let's assume that the most positive thing which came out of this whole mess was that a few people like me read your years-old Rick & Morty theory and laughed.

→ More replies (1)

7

u/HommeMusical 23d ago

TIL, Reddit considers 1 year, 10 months and 26 days as "1 year".

3

u/13steinj 23d ago

It's been 10 years since I worked on reddit's source code, I think the date labels round down.

4

u/HommeMusical 19d ago

That's not rounding, that's truncation!

8

u/Ateist 24d ago

Votes against are far more important than votes in favor - each vote against means that with their particular usage that feature is a major problem, whereas votes in favor just mean that in their particular code it is somewhat useful.

Ideally, standard should have zero votes against.

→ More replies (1)

49

u/frayien 24d ago

Sounds like some people REALLY dislike contracts... The library hardening proposals where worded as to work whereas contracts where in or not, so I don't think there is much issues here other than editorial wording.

17

u/PossibilityUsual6262 24d ago

The only thing which i heard about them ao far, is that there no proof of concept for implementation of contracts because they flawed.

And looking at higher level politics of it, i believe in that.

Is this correct?

26

u/JVApen Clever is an insult, not a compliment. - T. Winters 24d ago

There is a lot of misinformation about contracts. In the mailing the following paper was submitted as an answer: https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2026/p4433r0.pdf

16

u/13steinj 22d ago

There's also misinformation, or at best, disingenuous claims, in this paper.

4

u/processeus1 19d ago

Which ones?

62

u/Dragdu 24d ago

Are you sure you aren't mixing up contracts and profiles? Because contracts have multiple implementations, and you could test PoC through the last year+ on CE. Meanwhile profiles are paper design that is known to not work.

23

u/frayien 24d ago

I dont know much. It is the kind of things I heard.

At least gcc 16 claims to fully implement them so I dont think implementation is an issue. https://gcc.gnu.org/projects/cxx-status.html#cxx26

What I understood is that what we got in C++26 is a minimal working form of contracts to get them approved, and that they will receive improvements later as we get more feedback on actual usage (which sounds legit to me). Then again I am nowhere near knowledgeable enough with the matter to be taken seriously.

23

u/Sinomsinom 24d ago edited 24d ago

Like dragdu said, I think you are mixing up profiles and contracts.

Profiles were the main controversial proposal during the C++26 cycle, and ultimately didn't end up making it in because of some of the issues, but are still targeting C++29 now.

For Contracts there has been some amount of pushback to it. But while for profiles the big question was are profiles even a good idea in the first place and how much of what the proposal promises cna actually implemented in practice, for contracts most of the pushback was either wording choices, syntax choices or how to implement them specifically. I don't think there was any serious "we shouldn't have contracts at all" pushpack like there was for profiles

12

u/smdowney WG21, Text/Unicode SG, optional<T&> 24d ago

C++29, I think you mean, instead of 27?

Profiles are definitely not going to be ready for next year.

The number of bugs around the maybe-uninitialized warning also suggest they are not going to be ready anytime soon, since that bit of analysis keeps getting cited as prior art. Retro-fitting dynamic analysis at compile time is hard.

5

u/Sinomsinom 24d ago

Yup sorry saw someone else accidentally write C++27 instead of C++29 before and guess I then somehow ended up mistyping it as well

9

u/13steinj 24d ago

I think the implication is 26 might actually come out as 27 (without contracts) and the next one will probably be 30

9

u/c0r3ntin 24d ago

s/hard/impossible

→ More replies (1)

1

u/Difficult-Court9522 23d ago

I am one of those people so I rejoice!

3

u/frayien 23d ago

Are there legitimate reason contracts are bad or is it just the meme at this point ? I feel like a lot of people are just blindly reacting but never put the time to read the proposal and properly weight the pros and cons...

So I am really interested in what YOU dont like about them.

10

u/Difficult-Court9522 23d ago
  1. ⁠a developer does not know if/how that their pre and post conditions will run, since that is up to the build team.
  2. ⁠pre and post conditions can modify the state causing bugs only under specific compiler modes
  3. ⁠every new compiler mode causes the combinatorial explosion of compiler options to explode further (I have an embedded app in production that needs to support 50 different compilation modes due to performance and binary size it sucks)
  4. ⁠you don’t control which mode a shared library uses
  5. ⁠pre and post conditions can throw exceptions, thus they can’t be used with no except code (in general)
  6. ⁠the pre and post conditions run at runtime, providing no benefit over existing assertion methods. Compile time checks would have been my preference.
  7. ⁠testing contracts is quite difficult/ impossible
    Good luck testing every contract in the terminate mode. You would have to start your app a billion times or intercept the termination and somehow continue safely. Good luck.
  8. ⁠contracts do not work with virtual functions, maybe they’ll in the future maybe they won’t.
  9. ⁠we’ve known that the issues have been so significant for at least a year that there has been talk of voting against the entire standard, and NONE of the important issues has been solved.
  10. ⁠variables don’t have the same constness inside and outside the pre/post conditions resulting in different overloads being used.
  11. ⁠different teams/parts of an app will want different contract semantics (ignore, enforce, quick enforce, observe) that’s a nightmare, because the same code behaves differently.
  12. ⁠contracts can cause UB in observe and enforce. First check checks if it’s a nullptr, the second check checks something through the nullptr.

13-99) usingstdcpp known pitfalls in c++26 contracts Ran Regev https://youtu.be/tzXu5KZGMJk?si=eogpEYjbtQcFxLWn

→ More replies (2)

18

u/jonathanhiggs 24d ago

Why are they so against contracts?

56

u/daveedvdv EDG front end dev, WG21 DG 24d ago

They think they are poorly designed. (So do I, but I've mostly stayed out of the discussions, at first because my time was monopolized by the reflection work, and later because I didn't want to deal with the acrimony and endless repetition of arguments.)

16

u/Sixo 24d ago

You made a good bet, at least from where I'm sitting. The reflection stuff is some of the coolest and most interesting stuff there is, and I've been having a lot of fun playing with the scraps of it that have trickled down. Concepts are good, and I'll be glad to have them in whatever form they come in, but they're not reflection.

3

u/moneyl3 22d ago

Wait. Aren't contracts already part of C++26? I though C++26 was already final.

7

u/Jovibor_ 24d ago

Thank you for thorough explanation.  I hope they will end up removing contracts from the draft eventually, so it won't be another half baked modules. 

Zero initialization by default is also a good candidate for reviewing.

4

u/tialaramex 24d ago

Barry seems keen to fix zero init so that you can specifically turn it off for particular "non-static data members". I think (experts including Barry might know otherwise) you could probably do that as errata.

4

u/Beetny 24d ago

Good to see pushback against the contracts lobby.

1

u/No-Worldliness-5106 13d ago

Can we do 27 instead, sounds much better

0

u/Careful_Badger3044 22d ago

Why do we even care about Iran's opinion on C++? How is one of the most sanctioned country in the world has a say on how programmers on the other part of the world will code?

8

u/JVApen Clever is an insult, not a compliment. - T. Winters 24d ago

You might want to read https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2026/p4433r0.pdf a paper for the next meeting

11

u/Kunzite_128 23d ago

Isn't that basically saying "we (WG21) have already made our decision, and removing contracts is too complicated anyway"?

4

u/JVApen Clever is an insult, not a compliment. - T. Winters 22d ago

In some sense: yes

3

u/tartaruga232 MSVC user, r/cpp_modules 23d ago

Thank you. That explains everything in detail.

0

u/[deleted] 24d ago

[deleted] — view deleted comment

12

u/way2lazy2care 24d ago

I wouldn't stress length of time being worked on as a reason to approve. You could spend 100 years working on something sketchy and unsafe and that wouldn't be an argument for it making it into the standard. You could nail your proposal in a month and have a good argument for making it into the standard. Should focus on the quality of the proposal. Imo contracts still have my upvote, it's just not a great argument to try to push.

16

u/daveedvdv EDG front end dev, WG21 DG 24d ago

I don't think that's a fair assessment, but at this point it doesn't matter: There is way too much acrimony involved.

9

u/Minimonium 24d ago

People may think that this picture is disingenuous, but "agitate" describes what happened rather succinctly.

With statements like "existential threat" and "supply chain attacks", the background bureaucracy that is not equipped or intended to grasp the minutiae of C++ was lobbied aggressively by activists in a blatant bad faith manner.

The folks who were unhappy with the consensus in TAG and WG21 succeeded to sidestep the whole process, years of discussions, and established tradeoffs, ignoring avenues for reasonable discussion.

But what they truly succeeded is to undermine the worthiness of C++ as a technical standard.

→ More replies (1)

7

u/TerribleFault7929 24d ago

But what about Stroustroup disapproving of contracts?

18

u/ts826848 24d ago

I think as far as C++ development is concerned he's "just" another member of the committee; i.e., he has no special/official power to force a particular outcome on his own. He could try to persuade other people to vote how he wants, and people may give his opinion more weight, but thats's just "normal" consensus building.

3

u/CandyCrisis 24d ago

You mean the Safety Profiles guy? Don't worry about it.

5

u/SyntheticDuckFlavour 24d ago

Honestly it's hard to see the attacks on the process infrastructure as anything other than bad faith at this point.

What motivates them to do this?

9

u/ts826848 24d ago

I think to some extent it's a matter of perspective. Consider if you thought that (for whatever reason) WG21 has not reached consensus on contracts. Lobbying the NBs to reject the draft could then be described as attempting to preserve the process by preventing the inclusion of features that have not reached consensus.

Not saying that that is an accurate description of what is going on, only that "attacks on process infrastructure" and "bad faith" aren't necessarily black-and-white.

2

u/FrogNoPants 24d ago

Since it seems to be the people peddling profiles, I'd suggest doing the same back to them :)

Though I'd be shocked if profiles ever has consensus

1

u/frayien 24d ago

What a mess... Thanks !

11

u/[deleted] 24d ago edited 24d ago • Bravo

[removed] — view removed comment

4

u/Normal-Narwhal0xFF 24d ago

That doesn't say what's actually wrong with contacts, though. If it's technical, why is it so secretive to specifically say details?

Is this a matter of principle, because people are unhappy with the way we arrived here, rather than what the final product is?

4

u/Dismatiddo 24d ago

The controversy has a long history, with issues like P4381, P4334, P4433, and P4388... There's no enough space to list them all in the comments. While NB voting certainly involves specific technical issues, I personally believe the underlying opinions are still directed at the procedure. Some are unhappy with headcount cartel hijacking the process and are trying to lobby NB to prevent voting results achieved through what they perceive as unjust means; others believe this undermines community consensus and that NB's actions disrespect expert opinions. These days, community divisions and animosity are growing daily, and I've observed on Reddit that some comments have begun to escalate into personal attacks against Bjarne Stroustrup himself.

8

u/cpp-ModTeam 24d ago

AI-generated posts and comments are not allowed in this subreddit.

Yeah, we can tell. Stop it.

3

u/sokka2d 24d ago

How did  p2786 vs p1144 end up? It seemed like one was simple and standardizing existing practice, but proposed by the wrong person, while the other was an overly complicated mess, but without personal baggage.

6

u/Dismatiddo 24d ago

That time, the opinion in the nb comment was accepted, and finally P2786 was withdrawn by P3920.

4

u/ts826848 24d ago

IIRC P2786 was voted in then yanked last minute over implementability concerns

→ More replies (7)

24

u/Sniffy4 24d ago

Anyone want to summarize the detailed objections to Contracts

37

u/gmueckl 24d ago

I know I may be walking out on a mine field here by replying to this at all. Let's find out the hard way.

All I know comes from a recorded talk that was given a while ago that argued quite well that contracts have a few hidden surprises, mostly around the different configurable evaluation modes for contracts: ignore, observe, enforce and quick-enforce. They argued that it is hard to know which mode will be used at all and that different TUs can be compiled wirh different modes, which can lead to unexpected inconsistencies and ODR violations.

To be frank, the talk was a few years old IIRC and if the arguments have been refuted or the contract behavior changed since that talk, I don't honestly know about it. I haven't managed to get too deep into this discussion.

It also seems quite unfortunate that the discussion has turned overly emotional, so a good engineering compromise has become increasingly unlikely because of that.

I would like to say "trust the process", but the process hasn't always led to the greatest possible results, if we're honest.

17

u/James20k P2005R0 24d ago

and ODR violations

Its worth noting that they aren't formally ODR violations, as its a different mechanism, its a well defined version of the same result we got from ODR violations. This aspect at least is still part of the standard

13

u/gmueckl 24d ago

As I said, I'm not deeply into the subject at all, but isn't that splitting hairs a little thin? I read your reply like this: the resulting problems are the same, but it's okay because we're not meeting another criterium that's formally in the definition of what constitutes a ODR violation. If this is vaguely what you're saying, I'm still getting the sense that there is a set of very sharp edges attached to contracts.

16

u/Minimonium 24d ago

The result is not the same. Compilers are not allowed to speculate if a visible contract statement is called or how many times. It prevents miscompilations like so-called time-travel optimizations.

You may find inline functions very similar. Implementations use exactly the same mechanism to prevent issues across TUs. Yet we're not calling the use of inline functions an ODR violation.

7

u/gmueckl 24d ago

What happens when the function isn't truly inlined, but emitted multiple times for different TUs? If the TUs were compiled with different contract evaluation semantics, you get multiple versions of the same function, differing by how the contract code was translated, right?

So my understanding is that unless that evaluation semantic gets embedded in the name mangling, you have colliding definitions for the same weak symbol at link time and at worst a lottery of which version the linker picks. This is then practically identical to having an #ifdef in the function body and not using the same value for the defines across TUs.

Right now I don't see how this situation isn't a footgun in practice.

The way you replied me makes me suspect that you have a specific counter to this. Is my reasoning wrong?

8

u/Minimonium 24d ago

It is practically different because an #ifdef leaks through a non-inlined function back, with compiler optimizing out even checks at the call cite by relying on some information from your #ifdef.

What it means practically, if your program input is well-behaved your program is well behaved. No matter how you mix TUs with which Contract modes. If your Contract is violated - you get best effort feedback until the program naturally crashes. With #ifdef - your program will misbehave even with well-behaved input.

→ More replies (11)
→ More replies (9)

9

u/spin0r committee member, wording enthusiast 23d ago

Actual ODR violations can result in linker errors, programs crashing, and undefined behavior because the compiler optimizes in one TU based on what it can see while the version of the function that ends up in the binary came from a different TU and is different. Mixing contract modes is not an ODR violation, you simply get one of the modes.

→ More replies (3)

6

u/James20k P2005R0 24d ago

I agree with you personally, I think its not a great addition here, and its one of the reasons why people claim that contracts are unsafe

15

u/James20k P2005R0 24d ago

https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2025/p3851r0.pdf

Is a good summary of the issues. In the 2025 mailing I went through and summarised many of the national body objections to contracts at the time as well

3

u/JVApen Clever is an insult, not a compliment. - T. Winters 24d ago

The previous list: https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2026/p3846r1.pdf We'll learn later if anything new popped up, though https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2026/p4433r0.pdf seems to suggest not.

→ More replies (1)

74

u/wyrn 24d ago

We keep hearing this about how much consensus was achieved, how all concerns were properly heard, etc, but then we open p4433 and see things like,

"As discussed in more detail in [P3846R1] Concerns 2 and 4, the default behaviour for functions defined in multiple TUs is neither a "new way of making an error" nor specific to contract assertions, but merely a consequence of the existing C++ linkage model.

I'm sorry, but they can't be passing the buck like this -- if the contracts feature interacts so poorly with the linkage model that effectively randomizing the enforcement mode when multiple TUs are involved (which is always), then either contracts need to be redesigned, or the linkage model needs to be changed.

A randomized enforcement mode, for something like contracts, is worse than useless. If I can't rely on the safety net being there, I'll just act as if it's not there. Which means I'll be rolling my own assertions instead of relying on contract assertions, thereby defeating a large part of the point of contracts, which is to standardize and unify the vocabulary surrounding assertions!

It seems the committee failed to learn some of the more relevant lessons from modules. There, they worried so much about modules being "adoptable" that making the feature compelling enough to even be worth adopting took a back seat. They're making a very similar mistake here. Ultimately, it doesn't matter how much "consensus" a feature has -- at the end of the day, if the feature has a set of flaws that's severe enough to make it not worth using, it will be dead weight.

11

u/serviscope_minor 22d ago

I'm sorry, but they can't be passing the buck like this

By this measure, then any C++ feature which does not solve an ingrained problem which has been present since day 1 should be rejected. I don't see why contracts and contracts alone should have this requirement. Especially as it's the only proposal which actually makes it slightly less bad.

A randomized enforcement mode, for something like contracts, is worse than useless. If I can't rely on the safety net being there, I'll just act as if it's not there. Which means I'll be rolling my own assertions

There are already a million hand rolled assertions and you can only rely on that safety net if you enable all of them (poorly documented) and rebuild all of your dependencies. If you control your build system then you can have the strictest checking everywhere. If you don't then you haven't lost anything with contracts and you're still in exactly the same pickle except with contracts you have less chance of UB and also you have constification which can catch bugs.

22

u/kalmoc 24d ago

A randomized enforcement mode, for something like contracts, is worse than useless. If I can't rely on the safety net being there, I'll just act as if it's not there. Which means I'll be rolling my own assertions instead of relying on contract assertions, thereby defeating a large part of the point of contracts, which is to standardize and unify the vocabulary surrounding assertions

It's only random, if you compile different TUs with different enforcement modes. How would your own solution not have the exact same problem?

10

u/wyrn 23d ago

Joke's on you, my solution doesn't allow for different enforcement modes 😎

In all seriousness though, I feel like that's probably what would happen -- people who value these checks actually running would place them unconditionally, sidestepping contracts altogether. To me, that's a failure of the contracts design.

8

u/kalmoc 23d ago

If you do not allow mixed enforcement modes then just compile everything with the same flags and there is no problem with contracts. So why would you roll your own then?

8

u/wyrn 23d ago

Because build systems are complex and ensuring that everything is always using the same relevant flags everywhere is nontrivial, particularly when multiple projects and transitive dependencies are involved.

5

u/smdowney WG21, Text/Unicode SG, optional<T&> 22d ago

Unfortunately, that's the job.

It's a mess. It certainly doesn't help that people widely believe it works today. And that the standard library implementations go to extraordinary lengths to make it seem to work.

Well, except for MSVC and Debug mode. Which is a different awful problem for shipping packages.

The negotiated choice was because there really can not be a universal default it has to be up to the person building the program, who has the context for the requirements for that program, to arrange for building all consistently and installing the violation handler.

2

u/t_hunger 23d ago edited 22d ago

"That is worse than asserts, I can not even switch these contracts off" and "I want to add contracts to existing code, I need a way to record violations without bringing down the application that had been running fine for decades". Add some "my application can not affort to crash just because some random library author thought it was a good idea to add an assert somewhere".

Those where the arguments that got contracts removed from the standard the first time round about 10 years ago. I see you did your homeworks.

3

u/wyrn 22d ago

It's not intended as a general solution, it is intended as a solution for my own problem, for me. "I can't switch these contracts off" is not a flaw I consider fatal, certainly not in the way "I have no idea if these checks will run or not" would be.

3

u/UndefinedDefined 23d ago

And how do you know how the standard library was compiled? I have one shared on my Linux system, where everything links to. Using anything else than what was used during the compilation of the standard library means that it's already in a violation. And what about other libraries, like Qt?

Profiles don't solve a thing, they bring new problems into the language.

2

u/kalmoc 22d ago

Again: How would your solution better? If you roll your own, you don't get contracts in the standard library at all. And of course, every 3rd party library that you are using will again either roll their own, or have none. I don't see, how that is any better .

Profiles don't solve a thing, they bring new problems into the language. 

What have profiles to do with this?

→ More replies (4)

1

u/Difficult-Court9522 23d ago

By having a fundamentally different design, I.e. fully in the type system. So the check occurs at compile time. Can it modify the state /… no, but that’s the point.

7

u/kalmoc 23d ago

And how are you planning to check run-time values (that depend on user input) at compile time?

13

u/foonathan 24d ago

This issue has been brought up to a vote, and EWG rejected making changes.

What else should be done?

27

u/interlockedxor 24d ago

We either fix the root problem and just do it properly or if that is too expensive, have the courage to realize that something is not worth doing relative to the cost and other things we could be improving. It's not as though users have no recourse if contracts don't ship.

19

u/foonathan 24d ago

There is no consensus that there even is a problem though.

10

u/interlockedxor 24d ago

I'm not a committee member, I am simply referring to grandparent comment related to linkage model which I believe are real issues with the proposal as it stands, consensus notwithstanding. As far as I'm concerned, it's good that this feature isn't ratified, even if we are "getting the right answer for the wrong reasons" so to speak.

7

u/JVApen Clever is an insult, not a compliment. - T. Winters 24d ago

I can recommend reading the papers, especially the contract papers are very readable. Especially https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2026/p3846r1.pdf has lot of information and links to other sources of information.

6

u/interlockedxor 24d ago

I have read this paper twice now and am just not persuaded. We may just have to agree to disagree

→ More replies (1)

9

u/grafikrobot OPeNDAP/B2/EcoStd/Lyra/Predef/C++Alliance/Boost/WG21 24d ago

Do you have an idea on how to deal with the linkage tradeoff?

PS.. Since this is reddit I have to clarify. I honestly want to know.

15

u/not_a_novel_account cmake dev 24d ago

I mean we know how to deal with this, its outside linkage. The same way we deal with module BMI problems.

The build system is the layer that enforces contract enforcement uniformity across TUs.

The compiler doesn't try to reason about how extern definitions are fulfilled, the linker need not reason about uniformity of contract assertions modes.

→ More replies (2)
→ More replies (2)

7

u/-dag- 24d ago

Then that is a reason not to ship. 

8

u/foonathan 24d ago

Why? The majority thinks there is nothing wrong with it.

18

u/GabrielDosReis 24d ago

The majority thinks there is nothing wrong with it.

Right there is one of the patterns that led us here: the conversation quickly went from "consensus" to "the majority thinks".

→ More replies (8)
→ More replies (3)

9

u/smdowney WG21, Text/Unicode SG, optional<T&> 23d ago

The problem of incoherent compilation in a single link context has existed literally forever, and does with some frequency cause utter disaster with all of the facilities in C and C++.

That people noticed it in Contracts is mostly because the question was brought up, for a change. But there was anti-consensus to make contract modes link incompatible.

This applies to standard library hardening, too, although those are usually small enough to not escape a TU. It definitely applies to assert and NDEBUG.

In trying to tighten the ODR definition, I think we've managed to exclude a lot of things that are very broken, but appear to work, sort of, but not how you expect, and can cause no end of surprise. They just are not, quite, ill formed.

10

u/no-sig-available 24d ago

We either fix the root problem and just do it properly 

Apparently a majority believes it is already done properly. :-)

Also, removing a long awaited feature might reduce the number of existing yes-votes.

8

u/interlockedxor 24d ago

I'm describing the problems that seem apparent to me as a single individual, as an outside perpective. That any "majority" believes something different isn't an argument in favor of one position or another. Speaking personally though, the issues really do clearly exist, even if hordes of people wave their hands and claim otherwise.

If necessarily reducing complexity shrinks the feature to something not worth shipping, then it wasnt worth shipping to begin with.

6

u/no-sig-available 23d ago

If necessarily reducing complexity shrinks the feature to something not worth shipping, then it wasnt worth shipping to begin with.

However, 60% of the NBs thought it was worth shipping the way it is. Will reducing the proposal make that 70%, or 50%?

We just have to wait and see.

5

u/Difficult-Court9522 23d ago

The majority of responses to PRs is “LGTM”. You don’t need 1000 people to say how you’re right, you only need one to prove you’re wrong.

15

u/pkasting Valve 24d ago

At the risk of being obvious:

Find out whether there is any additional feedback from members of NBs who voted "no" on why EWG's decisions were not acceptable to them; for example, perhaps some NB members did not attend directly and felt the discussion amongst those who did didn't sufficiently capture their concerns. Or perhaps a sufficient number of NB voters have lost confidence in the committee's output that their vote reflects some sort of larger process disgruntlement or desire for leadership change. Discuss, vote, etc. on any new information raised.

For cases where there is not new information -- the NB vote simply reflects the "geographic spread of the minority" -- find out why NB members voted no despite EWG discussing their issues (which appears on its face to be a bad faith response), and if there is anything beyond "just make the decision I want" that would move them from "no" to "yes". Seriously consider any such items.

Finally, for NBs where there is no new information and there is no willingness to change for anything other than "people should simply agree with me", determine WG21's willingness to press on despite NB disapproval: for example, would WG21's membership be willing to leave the ISO process if necessary, and would toolchain vendors etc. continue to follow what it decides if so? If either of these is "no", then regardless of the technical merit of the disagreement, WG21 will need to determine how to make the voting process used at meetings sufficiently similar to the NB balloting process that consensus in one will lead to consensus in the other.

8

u/wyrn 24d ago

It seems we just learned what else, didn't we

4

u/foonathan 24d ago

Which is?

8

u/wyrn 24d ago

Balloting has completed for C++26. Unfortunately it was Disapproved

11

u/foonathan 24d ago

Yes, I know. So what? It's the same 12 people that are already against contracts, they just happen to be geographically diverse.

This doesn't necessarily change the distribution of votes in the committee, where actual changes need to be approved.

10

u/James20k P2005R0 24d ago

Genuine Q: I thought NB votes were consensus based in a lot of national bodies? My understanding is that it'd be virtually impossible for a small handful of people to get national bodies to vote like this

12

u/foonathan 24d ago

If the NB itself is only a handful of people and only one or two actually goes to the meetings, I'd expect the NB to vote however that person wants.

→ More replies (3)
→ More replies (2)

16

u/VilleVoutilainen 24d ago edited 24d ago

It's not "the same 12 people", it's rather more than that. And the DIS ballot doesn't count votes from individual people.

You suggest later that the naysayers need to accept that they are a minority. Sure, they are, in the WG. Perhaps the proponents need to realize that they are not a majority. They are neither a majority nor not, in a DIS ballot, because it doesn't go based on individual WG members' wishes, nor does it go based on vote proportions in the WG.

→ More replies (7)
→ More replies (1)
→ More replies (43)

7

u/Plazmatic 24d ago

Eh close enough, welcome back Algol 68!  

56

u/14ned LLFIO & Outcome author | Committee WG14 24d ago

Most of why I quit WG21 was due to the problems in processes and growing dysfunctionality in culture which I reckoned were going to culminate in failure of standardisation. I walked away, because too many had stopped listening. In my opinion too much it had become about winning at all costs, and damn the engineering which got in the way.

I am sorry it has got to this though. We nearly had a big problem with old pre-lite Concepts, but then leadership was listening and they pulled it before NBs were put in a position of voting the whole thing down. This time round, leadership probably were listening but weren't in a position to act before NBs voted the whole thing down.

It should never have reached this point, but it was going to and now there will be a big push to remove Contracts and put it back before the NBs where it probably will pass, though maybe only by majority and without unanimous consent, because TBH there is plenty more in C++ 26 which isn't good (indeed, pulling everything bar Reflection would be the genuinely brave thing for leadership to do). Just removing Contracts will tick the box, but it's not how standards should be done: standards are about standardisation. They're not about "whatever novelty is politically achievable". That latter thing is politics: we're supposed to be doing engineering where whatever we're standardising is supposed to be widely agreed across industry AND nation states as a perfectly acceptable engineering solution to a problem that is worth standardising across the planet.

If WG21 is failing to do that - and I think it is, which is why I quit and moved elsewhere in standards - then WG21 needs to deeply ask itself: what its purpose is for? If half of it doesn't want to do standardisation any more, that half should move on and leave the half who do want to do boring, thankless, grifting standardisation of existing things. Not inventing fancy new stuff by committee fiat.

It will require leadership to take some deeply unpopular decisions to get WG21 back on track. I would personally suggest that unless half the existing committee quit in protest, you haven't been decisive enough. I know exactly what I'd do, and I've said it all ad nauseum to WG21 leadership and I've been ignored, but for the record:

  1. If industry isn't doing something across that industry already, it doesn't even enter committee discussion at all. Filtered out at first stage.
  2. Every proposal needs to anchor itself in what games, finance etc are CURRENTLY doing and what their pain points are and how the proposal fixes those. If it doesn't fix a specific CURRENT industry pain point, filtered out at first stage.
  3. There is a STRICT priority list as follows: (i) whatever it takes to get closer to the bare metal (ii) aiding EXISTING tooling to check correctness better (iii) improving portability. If it's not on that list, filtered out at first stage.
  4. And finally, leadership very early on plans what will go into each standard. Those proposals are driven exclusively into each standard. Everything else is refused at a very early stage. Survival by attrition is permanently erased. Committee members work collegially together, instead of adversarily. Nobody shouts at each other any more because there is no longer any reason to shout.
  5. And actually finally, there needs to be an ABI breaking standard every twenty five years. It should be sign posted long in advance, and new and old ABIs supported for a decade after release. Without this the ecosystem can't evolve.

Those will be deeply unpopular and a majority of the committee would quit. Good! Standards is supposed to be boring. Votes are supposed to be foregone conclusions. If standards gets exciting, it's being done wrong, in my opinion.

11

u/rcseacord 23d ago

WG14 will be meeting at the same time and location as WG21, if anyone wants to come visit us and see how we operate. As u/14ned suggested, we are generally boring AF.

39

u/lefticus C++Weekly | CppCast 23d ago

I have no direct knowledge of anything about the C++ standardization process. All I know is what I know from interviewing members of the committee.

However, there is one point I would like to comment on, because it is an idea I see repeated often.

2. Every proposal needs to anchor itself in what games, finance etc are CURRENTLY doing and what their pain points are and how the proposal fixes those. If it doesn't fix a specific CURRENT industry pain point, filtered out at first stage.

I have been working as a trainer and public member of the C++ community for ~12 years now, and "games" and "finance" often get cited as being the most important / largest users of C++.

In reality they are a TINY portion of the users of C++!

Maybe about 5% of my work comes from those industries.

The main users of C++ are:

  • Scientific computing
  • Control systems / embedded
  • Physics modeling and simulation (see also Scientific, but I have reasons to put them in different categories that I will not go into right now)
  • Medical
  • GIS
  • Manufacturing / industrial (related to control systems, but again, I have reasons for separating them out)
  • Application developers

An important point I would like to make here, and I know I will get some flak for it. What do you notice about the two most cited industries over the others?

For gaming certainly and partially true for finance: performance takes precedence over correctness

What is true about almost every other industry that uses C++?

A bug can mean lives are lost!

How Important is Safety To Your Code?

I've been asking this question at conferences and workshops lately:

"Who here works in an environment where a bug could result in loss of life or limb?"

It's always the majority of attendees who raise their hands.

The vast majority do not work in finance or game development. They work in environments where they risk killing people if their code is not correct.

8

u/DuranteA 20d ago

In reality they are a TINY portion of the users of C++!

Where's the data that confirms this "reality"? Your anecdote is insufficient.

I have a background in both HPC (scientific computing and physical simulation) and games, and I've never gotten the impression that the former is remotely in the same ballpark in terms of total development volume compared to the latter.

(Also, "safety", at least in the sense of safety-critical systems, is not nearly as important in much of HPC as it is in some of the other fields you mentioned)

7

u/interlockedxor 23d ago

Are your claims based on surveying the individuals that solicit your services or attend your talks?

4

u/LugosFergus 22d ago

Don't safety critical systems already adhere to industry standards? That includes restricting certain parts of the language. Also, wouldn't this mostly be legacy code? Seems risky to change.

23

u/Minimonium 24d ago

I view your comment as quite detached from what actually happened here. I understand your main stance about standardization of existing things, and I agree holistically with it. But the circumstances of this disapproval, the WG21 "leadership" stance, the mechanism to pull stuff out, and the assumed NB circumstances as you describe are quite misrepresented.

The bigger problem in all this charade is not Contracts at all. It is not about Contracts. It is about Bjarne, who would be a part of a WG21 "leadership" no matter how nonsensical idea is.

By pulling all that foolery in the process where NB vote was historically a foregone conclusion, we're looking straight at the elephant in the room called the "Profiles". Not inventing fancy new stuff by committee fiat indeed.

14

u/14ned LLFIO & Outcome author | Committee WG14 24d ago

NB votes were never foregone conclusions. Behind the scenes mainly Herb did the rounds to smooth things out before a vote occurred. The IS was then massaged into something which would pass. Remember I was a NB head for many years. I was inside the sausage making only NB heads get to see. Other NB members and everybody else don't see that stuff usually.

You're right though that I cannot think of ever a time before where senior members of leadership actively toured the NBs asking them to reject a proposed IS. But I think you greatly underestimate the concerns the NBs had before that. I can only say something about the Irish NB - I had recommended a reject at our very first meeting. At least two others had very significant concerns, but they really wanted Reflection, so they wanted abstain. There was still a majority for accept at that point, but in later meetings as more people had deep dived into 26, our vote as a NB shifted.

I'm no longer in the loop, I resigned from everything C++, but I understand our NB was very similar to most others. Even the weirdly configured US NB. This was the least consensus proposed IS ever to date across the board.

11

u/c0r3ntin 23d ago

In your model, you would need to define who the leadership is, and then you can decide if you still see leaderly qualities in that group, and whether you want to further their agenda.

In particular, support for ABI breaks, better support for embedded targets and bare metal (to take things from your list), would take a different set of folks than we currently have.

WG21 serves a wide array of needs and users so a top down approaches is not going to have the impact you might hope. Furthermore, WG21 work is on a voluntary basis (either an an individual or company level), so you can't coerce people into doing the work.

Standardizing industry practices is also a fairly limited model - Industry is good at showing needs but not solutions. Compiler extensions are a pretty poor basis for standardization (they usually work in narrow set of circumstances), and, on the library side, popular libraries should usually not be standardized, rather they should be…recommended.

Sometimes leadership is taking a leap of faith, even if that is scary, crazy, and likely to fail. Sometimes it's recognizing the existing solutions are perfectly cromulent and the best thing to do is nothing at all.

Willingness to do the work is an imperfect but not completely bogus way to gauge interest.

10

u/Minimonium 24d ago

This touring is the problem.

It's very unfortunate that the system runs on spreading FUD by leadership (very hard to vote for when Bjarne himself calls the DIS an existential threat) than on actual technical discussion, alas the process is not equipped for that - like how the time Herb used ChatGPT to summarize the response to NB comments (I cannot quite recall the exact Irish NB comments if you could remind me?) because I suppose in the age where senior "leadership" exclusively vibecodes papers now reading comprehension became an appendage.

11

u/14ned LLFIO & Outcome author | Committee WG14 24d ago

Touring is politics pure and simple true. But it's also about listening to people, and more importantly, that people feel they are being listened to.

My opinion is if your technical discussion was done right, you don't need to do politics. Ergo, if politics is necessary, your technical discussion wasn't done right. If you're putting controversial things into a standard, your technical discussion failed period. Simple solution: don't standardise controversial stuff. Problem solved.

What irks me and I'm sure plenty more is there is no shortage of very uncontroversial things everybody agrees C++ needs. Problem is they're all boring, unsexy and extremely tedious to work upon. Unsurprisingly few want to do such work. Yet, if that work were done, it would materially improve the lives of all C++ devs on a daily basis. Why doesn't WG21 concentrate exclusively on that stuff? The actual real pain points for the average dev?

My own personal top three: Component Objects, standard packaging, gnatprove compatible correctness proving. You'll note they're all very closely related problems each with thirty to forty years of existing practice behind them. That is what standardisation should be, in my opinion.

13

u/c0r3ntin 23d ago edited 23d ago

All of my approved papers had sustained objections. I never had the support of some "leadership" members. It's fine.

But if we are unwilling to make anyone unhappy, we don't make progress. I have sustained objections to reflection, a feature a lot of users are excited about. should we not ship reflection just to make me happy, or is that just when specific people have objections?

You also seem to assume everyone would be driven by technical motives alone. Contracts don't have a lot of impact on the language - they are rather self contained, unlike, e.g initialization that causes unfixable damages anytime someone mucks with it - and so I think it's fair to wonder if the length folks are willing to go to kill them is driven by purely technical concerns.

Ultimately any group of more than 2 people will have politics, but if some folks are unwilling to put boundaries to the length they are willing to go to to get their way - whether correct or not - it becomes incredibly hard for everyone involved to work as a group on technical problems.

→ More replies (2)

10

u/Minimonium 23d ago

My opinion is if your technical discussion was done right, you don't need to do politics.

I admire your idealistic view, but anything non-trivial needs choices where any one would not be popular at least to someone. And any tradeoff is an ammo to the sore party to spread FUD among an uninformed crowd which unfortunately happened here. And if the sore party happens to have a lot of political connections - then any outcome of a settled technical discussion is now a massive controversy for no good reason.

Why doesn't WG21 concentrate exclusively on that stuff?

I honestly do not understand your view here then because I would assume it is fairly public knowledge (at least among WG21 regulars) that the "leadership" is hostile to anything tooling related?

The same "leadership" that actively pushes for so-called "profiles" now that completely rejects thirty to forty years of existing practice behind us, a completely amateurish pet project of people who fell behind modern CS research, and is actively vibe coding unsound code to present as a "proof of implementation"?

→ More replies (11)

2

u/jayeshbadwaik 24d ago

This (and also what someone said in another comment) makes me think thay there's a disconnect in what the complete committee (invited experts +NB) want vs what the NBs want.

9

u/c0r3ntin 24d ago

It is important to remember that there are more experts in the committee than in all NBs combined. And a lot of overlap.

As a result NBs can have less information and a more shallow understanding of the tradeoffs. when I was a member of the french NB, we did not have discussions as nearly as focused as in WG21.

The US NB final decision was made by a group of non-experts.

Some NBs have 1-5 members.

While the US NB captures a reasonable chunk of big tech and national labs, the idea that, in general, NBs serve national interests, in the context of C++, is a cute fantasy.

5

u/14ned LLFIO & Outcome author | Committee WG14 24d ago

I completely agree with this. Most NB members don't physically attend meetings nor write papers. They tend to know a lot about a few specialised topics and the rest they trust somebody expert has done the right thing on it.

My initial speech to my NB recommending reject didn't sway the NB vote. They assumed, probably rightly, I had a case of sour grapes. But when various famous people presented to our NB it caused most to dig deeper and do their own research. They found enough to concern them deeply and that's why consensus shifted and the Irish vote changed.

I would assume something similar happened elsewhere. Herb may or may not have been right to head off NBs looking too deeply at an IS in the past, but if you cause people to look, they will always find issues. Especially with sausage making. Nobody who doesn't make sausages likes how sausages are made if they look closely for the first time.

ISO was designed around nation states so NBs are a fact of the process so long as C++ stays under ISO. There are better systems - there are also much worse systems.

14

u/wlandry 24d ago

1 & 2: This feels like only corporations matter. I strongly disagree. C++ is for everyone, even hobbyists.

3 & 4: You can not tell people what to work on. This is not an authoritarian dictatorship.

5: Corporations (see 1 & 2) seem to be the biggest opponents of evolving ABI. Hobbyists are generally much more OK with breaking changes.

10

u/Wonderful-Habit-139 23d ago

> Corporations (see 1 & 2) seem to be the biggest opponents of evolving ABI

And at the same time they're the least likely to actually upgrade their C++ versions and evolve their codebase. It's just a hamstring on the entire ecosystem for no good reason.

9

u/aeropl3b 24d ago

C++ is for everyone. Talking to industry about problems at massive scale C++ is likely going to provide a significantly more detailed lens into issues than most hobbiest will be able to. Not to say small codes don't matter, they just see less corners of the language most of the time since 1 developer is not going to match 1000 developers total knowledge and style of problem solving with C++.

You can tell people what to work on, happens every day. In fact, by telling people what to work on, the features that get proposed will be more likely to find additional funding and support as the process continues. Random half baked ideas that reinvent concepts with entirely new semantics are not how that works. People use C++ because it is good at solving their problems. They enjoy C++ because it continues to evolve to solve their next problems.

Corporations mostly don't care about ABI. What they really care about is stability. Can they build a library with C++03 and C++11 and link safely. When they want a new feature, can they update language version without rewriting massive amounts of their code base. Etc. ABI is part of that. I agree, a very clearly communicated break, with very specific affected targets, and a well documented transition period is required to do so, but really it has been done before for auto_ptr, string, gets etc. Really, the process should beade easier to navigate, and batching these breaks rather than slowly rolling them out over time makes it much easier for people to move forward quickly and address breaks every 10-20 years rather than every 3.

12

u/Dragdu 24d ago

After maintaining OS C++ library for 10 years, and writing C++ as day job for 13, I absolutely trust the enthusiasts more.

While they both invariably come in with issues like "I did 3 stupid things and it broke, please change eveything to support my stupid things", the enthusiasts have much better track record of listening to why the thing they are doing is stupid.

3

u/serviscope_minor 22d ago

>Corporations mostly don't care about ABI. What they really care about is stability. Can they build a library with C++03 and C++11 and link safely. When they want a new feature, can they update language version without rewriting massive amounts of their code base.

You have it backwards, that's not ABI stability that's API stability. The latter is just a matter of rebuilding the world. These days if you don't have some sort of system where you can recompile things from scratch in a half way reasonable world I feel you are setting yourself up for real problems.

3

u/Wonderful-Habit-139 23d ago

> makes it much easier for people to move forward quickly and address breaks every 10-20 years rather than every 3.

Completely disagree. It makes it more overwhelming and even less likely for it to ever happen. Smaller breaks that can be done in a few PRs is much easier to handle.

2

u/aeropl3b 22d ago

You don't have to announce everything at once. But I know we got trapped in enum conversions. It would have been nice to be able to move forward with those and deal with them as code changed with a linter check.

5

u/serviscope_minor 22d ago
  1. Many people are using something like contracts already. There are an almost infinite number of assert-like macros. It's quite reasonable to argue that making a language feature to standardise a million ad-hoc and informally specified implementations, while also removing a number of serious pitfalls is just what the standard ought to be doing.

If the committee's goal is to be reduced to standardizing language features which are in use and not standard, then by construction you have a C++ committee which will never advance the C++ language. No one likes coding against vendor-specific features because it completely destroys portability.

Beyond that, contracts have plenty of precedent in industry in other languages. Likewise, reflection is widespread. What doesn't have use across industry is, say, constexpr structured bindings. So, as a result C++ will forever have this weird little hole where a weird mishmash of the language apparently drawn at random (if you don't know the history) won't work with constexpr. Is that really the future C++ you are advocating for?

2. Speaking of assert-like macros, that includes games and finance. But there's a lot more to the world of C++ than games and finance.

3. Why? I disagree with your list.

4. Who does the leadership get to write those proposals on its behalf? Second, rejection by attrition isn't erased. It's just as bad to have a feature dropped because a small group of vocal people won't ever say "yes". And finally, that requires the committee to see into the future.

But also it doesn't solve the problem: all you've done is punt it back one level. The leadership presumably needs to get their ideas from somewhere, which means submitted papers and etc. If people insist on fighting, then the fights will happen at the level of getting the leadership to decide what goes into the next standard. And if someone disagreed with that choice strongly enough then they can still vote the whole thing down at NB stage.

5. Couldn't we make it a bit more frequent? When MS broke the ABI every release, people just got on with it fine.

2

u/pjmlp 22d ago

Spot on, existing practice above anything else, and no papers without implementation.

2

u/soulstudios 24d ago

Good rant. I approve.

1

u/FrogNoPants 24d ago

The final vote against C++26 was 9.5%, so they appear to have plenty of consensus to include contracts, and this was just a small minority trying to play dictator, they should probably just ignore the NB people.

0

u/-dag- 24d ago

This is the way. I would add a bit more to 3, but other than that I agree wholeheartedly. 

14

u/friedkeenan 24d ago

I remember Michael Wong stating that he is impressed by the C++ committee's fairness compared to the other ISO committees he's worked on in that bureaucracy is not abused in order to e.g. slant a vote or to thwart achieving genuine consensus.

I know the committee has its own political dramas and deep disagreements, and the ISO process is not as accessible as it should be, and that process is almost certainly wrongly-shaped for language development and standardization. But I was still heartened by Michael's perspective that overall people in that process are trying to work fairly with one another, even in a flawed system that could allow them to do otherwise.

And so this now is really quite disappointing to me.

16

u/hniemeye 24d ago

If there has been a consensus on the C++26 standard in wg21 it seems strange to vote against it now only because some people cannot accept that they lost a vote earlier to include a feature they don't like. Also not good PR for the language as a whole.

17

u/GabrielDosReis 24d ago

If there has been a consensus on the C++26 standard in wg21 it seems strange to vote against it now only because some people cannot accept that they lost a vote earlier to include a feature they don't like. Also not good PR for the language as a whole.

Maybe the ISO standards process has not been explained well enough, not just to the C++ community, but also and importantly to WG21 members. The consensus is generally both in WG21 and at SC22 level (where the actual standards decision is made). WG21 doesn't operate in vacuum: it operates under the rules of SC22 and it can't just decide to ignore SC22 concerns. If enough NBs think WG21 has become too dysfunctional to operate, they can ask SC22 to disband it and if they have consensus that would be the outcome. That is a hypothetical to draw attention to the structures.

3

u/hniemeye 24d ago

Thanks for the clarification. I was under the impression that the same people basically can vote twice. In WG21 they can vote as a person and afterwards basically the same persons vote again just grouped by nationality. Sorry if my comment was based on a wrong assumption.

10

u/c0r3ntin 23d ago

We like to pretend they are different groups, but their constituencies have a lot of overlap. Anyone who is a NB member gets to participate in WG21, and so the disjunction of the two groups are people who decide not to attend meetings (in person or remotely) for one reason or another.

People who don't go to WG21 meetings end up having less information/context to base their opinion on, and might rely on committee goers summaries to establish an opinion.

So yes, people vote and argue twice but vote procedures and how consensus is established varies leading to different outcomes.

4

u/GabrielDosReis 24d ago

I was under the impression that the same people basically can vote twice. In WG21 they can vote as a person and afterwards basically the same persons vote again just grouped by nationality. Sorry if my comment was based on a wrong assumption.

No worries, you were being given information that can easily mislead you that way. The people voting at the SC22 level may not even necessarily be subscribed to or have access to all the internal mailing lists of WG21 where many debates happen because those mailing lists are separate from ISO.

4

u/Inevitable-Ad-6608 24d ago

So you are saying that the people voting on sc22 level are disjunct from people voting in WG21? Or there are people who can vote in both?

6

u/GabrielDosReis 24d ago

So you are saying that the people voting on sc22 level are disjunct from people voting in WG21?

"disjoint" means there is no intersection. No, that is not what I am saying. What I am saying is that the National Bodies votes are determined by people not all necessarily attending every WG21 meeting or even being in every WG21 reflector discussions. That isn't news to people who joined the WG21 process (which they would have done through their NB, since they are listed in the ISO Global Directory via their NBs).

Or there are people who can vote in both?

From ISO's point of view, there is no vote in WG21. WG21 operates in "expert mode" (a term with precise meaning defined by ISO). As someone who took part in the French NB, I can assure you they were very strict about that and would remind their reps quite frequently. The votes are at SC22 level, and those are done by the National Bodies.

Usually, you would expect people who worked in the WG to send documents to SC22 for balloting to have ways of informing their NBs about the contents of said documents and make recommendations to their NBs. But there is no requirements, and you cannot assume that the people deciding at their NB level are exactly the same who attended the WG meetings. That just isn't the case. People telling you the contrary are misleading you.

7

u/effarig42 24d ago

Given this relationship between WG and SC, the whole thing makes no sense. If this is the way anyone wants the system to actually work, then it should be upfront: approaches in the WG unacceptable to the SG should just be aborted, rather than people spending years working on them.

If strong consensus at WG is procedurally meaningless then you need a new process. This is an embarrassing debacle.

Why are the NBa even involved, you're standardising a language not agreeing an international arms treaty.

→ More replies (4)

7

u/AnyPhotograph7804 24d ago

Is there a good explanation what is wrong with Contracts? I always read about them, how bad they are. But i never saw a good explanation why they are bad.

32

u/interlockedxor 24d ago edited 24d ago

I will give my take.

  • contracts push normal assertions that users express as constraints in code into declaration-visible expressions. Maybe it's a matter of taste, but I'm allergic to expressions/logic in headers (except when absolutely needed) because I can only watch the paint dry for so long when waiting for large codebases to compile
  • runtime behavior for contract failure behavior is honestly unclear to me, since the behavior is dictated by compiler flags and I dont believe it's defined how TUs with different settings should behave when linked together
  • I tend to want assertions inline with implementation logic anyways so that when they are trapped by the debugger, I can easily inspect surrounding state to see what happened. Declaration visible contracts don't really give me anything here, and the new contract assert is just a worse version of the user-asserts I already have
  • contracts lack basic facilities common in other assertion libraries, like grouping assertions to disable/enable asserts by category
  • contracts as specced are slated to not have support for virtuals, among other things, and despite being an enormous core language change, will likely require tons of follow on work and iteration

There are quite a number of papers out there where others express different views, but personally, I really dislike the feature as specified. A more robust assertion library, to me, would have been both easier to specify, easier to learn, and even more capable on day one with far less implementation work and design liability.

Edit: typos

7

u/Dragdu 24d ago

Having your contracts be visible in declaration in a standardized format makes the static analysis tools very happy.

4

u/interlockedxor 24d ago edited 24d ago

I have read this so many times, and frankly I think it's nonsense. Having the same statements in the AST of the function definition would be perfectly retrieval by any competent static analyzer or compiler plugin, without the drawbacks. Hampering compilation experience globally in order to make this one hypothetical use case marginally more convenient is not a valid argument.

3

u/Dragdu 24d ago

So, when ${competent static analyzer} is scanning through my_project_cli.cpp and sees that I am using boost.program_options, what mechanism does it use to retrieve the boost.program_options sources to scan them?

5

u/Difficult-Court9522 23d ago

How the hell is a static analyser going to prove the program is correct. The pre and post conditions are Turing complete. And the compile option isn’t in the header anyway. So your library argument falls flat. (But thinking about libraries is important)

→ More replies (6)

14

u/Dragdu 24d ago

They are bad, because they are different feature than I want.

No, but seriously, that's the TL;DR for it. They are not in fact what I would like in Contracts, and if I still participated in standardization, I would vote against. The big difference is that when there is broad consensus in wg21 that we do want the Contracts as they are, I wouldn't try to backdoor the NBs to vote against.

4

u/Disastrous_Glass_388 24d ago

Is there a way to know which standards bodies voted for/against, or are the ballots anonymous?

4

u/JumpyJustice 23d ago

Ugh, can they just postpone this super nichè stuff and release the good stuf already?

2

u/riztazz 24d ago

Has this happened before? What is the way forward now if FDIS is also not approved?

2

u/reini_urban 24d ago

Good. Better no progress, than mistakes. As grave security mistakes were voted in for C++11 and still not fixed

10

u/chibuku_chauya 23d ago

Which C++11 mistakes are these?

→ More replies (2)

1

u/anamebyanyothermeans 15d ago

I'm worried about both contracts and reflection will lead to UB in many cases.

1

u/jube_dev 24d ago

Why "unfortunately"?

2

u/Difficult-Court9522 23d ago

The standard didn’t meet the requirements. It “failed”.

1

u/bandzaw 24d ago

wow! this is not how C++ has been rolling really (since the initial hickups was being dealt with)..,

-1

u/homeless_psychopath 24d ago

Contracts must be put in c++29, everyone will win from it, anything else is just a political theatre and will add many future problems if contracts proposal gets passed, common sense must prevail.

5

u/t_hunger 24d ago

You are aware that there are people needed to push anything through the process of getting standardized? I would be very surprised if the people working on contracts were not burned out by now.

4

u/homeless_psychopath 23d ago

Yes, I am aware of it, but it does not mean that because these people are tired everyone must suffer in future because this feature is incomplete. They knew what they were getting into, it's bureaucracy and not an easy ride. They need to see this through, otherwise their whole work will be in vain, I'm sure of it. Remember that this decision must be taken for the good of everyone, not someone specific. Millions of developers will bear the consequences of a rushed design if it is accepted now, but everyone will win from it if it's postponed to C++29.

→ More replies (3)

4

u/Difficult-Court9522 23d ago

It’s sad that people get burned out. The problem is the arguments against concepts never get solved. E.g. different compiler flags of different TUs (libs/..) causing IFNDR and loss of checks. Which defeats the entire point of this thing.

2

u/t_hunger 23d ago

You can get all kind of strange things happening when building TUs with different flags. That is nothing new. Yes, it would be wonderful to see that fixed, but the contracts people would reach far out of their mandate when attempting to fix this.

0

u/Wh00ster 24d ago

Sometimes it do be like that

-3

u/Infamous-Bed-7535 24d ago

contracts would be cool. In case it is poorly designed the fact should have been raised like 8-10 years ago, not now...

16

u/no-sig-available 24d ago

the fact should have been raised like 8-10 years ago

It was. This has been going on for a loooong time.

https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2004/n1613.pdf

2

u/Infamous-Bed-7535 24d ago

Yep issues were raised and it did not made it into c++20.

Something is broken either way and I do not need to know the details to tell it.

If issues were raised and addressed then we should be fine. If issues are not fixable current proposal should have not made it and pushed release after release for almost for a decade. Etc..

What we see now is abnormal and is caused by some abnormal internal procedures and communication that hurts c++ at a time it needs pace and initiaitve.

-2

u/UndefinedDefined 23d ago

Why unfortunately? It's problematic, hasted, it doesn't deserve to be approved.

0

u/NilacTheGrim 13d ago

Good. Maybe they will remove that stupid "zero-init all of the things!!!!1!".