r/cpp • • 6d ago

Prediction c++26

Since there's no kalshi market for c++ standards, put your predictions below for the upcoming second dis.

49 Upvotes

132 comments sorted by

View all comments

44

u/ImNoRickyBalboa 6d ago

It will fail unless they drop contracts. Which they can't because they tied it to library hardening, so.... It will fail and there will be much clenching of hands and grinding of teeth 

21

u/James20k P2005R0 6d ago

Removing the library hardening tie in isn't nearly as complex as it had been made out to be by some, there's earlier versions of the paper that were not based on contracts

https://isocpp.org/files/papers/P4446R0.pdf

3

u/ImNoRickyBalboa 6d ago

Yeah, there was some hyperbole (Tm) in that response 🙂 I added my more nuanced thoughts.

5

u/ImNoRickyBalboa 6d ago

Let me be more nuanced in what I think the actual outcome will be. The draft as initially proposed will/would fail, so there will be a compromise.

There will be a revised ballot removing contracts from the draft. There is precedent for this: concepts was dropped for c++0x. It will delay official ISO publication, but no party here wants to kill ISO.

Library hardening can be reworded to its earlier non contracts spec, and contracts could be moved into TS. This is likely an acceptable compromise for all parties and allows everybody to move forward

24

u/azswcowboy 6d ago

Uh, no. Assuming SC22 takes the wg21 recommendation a modified 26 with the changes from Brazil will go back to the NBs for approval. If approval fails the project will be cancelled and the committee will continue towards 29 with contracts still in. The covenor has already said that’s what he’ll do. The committee soundly rejected any removal of contracts and hated the TS option even more.

12

u/ImNoRickyBalboa 6d ago

Even if they "win" with the proposed changes, there will be damage and credibility issues with the WG. They spent over a year arguing that in-source enforcement labels weren't needed for C++26 despite strong opposition. Throwing that in now looks more like gamesmanship than wisdom. They ignored and dismissed real, objective criticism of the design and security implications for over a year.

But we'll see what happens.

Personally I've lost quite some respect and faith in the WG and its processes. Big companies like Google are scaling down their participation to "minimal". The WG has become an echo chamber out of step with broader industry concerns, and is alienating a large body of c++ experts.

13

u/foonathan 5d ago

They spent over a year arguing that in-source enforcement labels weren't needed for C++26 despite strong opposition. Throwing that in now looks more like gamesmanship than wisdom

The plan always was to add labels in the C++29 time frame, they just weren't ready for C++26. Yet some people insisted that they absolutely need the feature, so a minimum enforcement label solution was pre-adopted.

Of course it's gamesmanship; it was a compromise.

They ignored and dismissed real, objective criticism of the design and security implications for over a year

No, those criticisms have been discussed for years. There are either solutions planned for C++29, which simply weren't ready yet, or a different set of tradeoffs prioritized.

The WG has become an echo chamber out of step with broader industry concerns,

That might be true, but I didn't see that with contracts.

and is alienating a large body of c++ experts.

I wouldn't classify the opposition to contracts as a "large body".

13

u/azswcowboy 6d ago

Spoken like a person not involved. The fact that the committee stuck to its guns on contracts is indicative of listening to embedded and automotive members that very much want this feature. Google wound down their attempt to dominate things years ago. The vote, in fact, indicates listening to the majority of users and members. Not to the FUD of less than 20 members opinions.

6

u/ImNoRickyBalboa 6d ago

It looks terrible from the outside. I'm sure that those in the club that can afford to travel around the world to mingle with the 'club' would like to differ.

 There's a lot I would love to see happen in c++, an overly complicated and fidgety contracts standard is not one of them.

12

u/serviscope_minor 5d ago edited 4d ago

> an overly complicated and fidgety contracts standard is not one of them

Do you have any concrete criticisms? In what way is it "overly complicated" or "fidgety". To me as someone completely uninvolved with the standards process, it looks to basically be a really clean standardization of a lot of random messy, ill specified assert macros, but with a bunch of got-yas cleaned up like:

* constifiaction is now a thing which is good because it's what you mean.

* mixed mode is now not IFNDR, so if you have cursed builds you won't get UB

* post conditions now run on all exit points of a function, guaranteed

There's nothing fiddly about it.

15

u/Daniela-E Living on C++ trunk, WG21 |🇩🇪 NB 6d ago

... those in the club that can afford to travel around the world to mingle with the 'club' ...

🤔I'm not sure if you are fully aware of how things work, are you?

No member is required to travel if they prefer not to. In-person meetings are not even an ISO requirement AFAIU, some WGs that I'm technically a member of rarely (never?) run them physically.

This time, a majority of members chose not to take on the burden of attending in person - for various reasons I presume. Some people like to extend their stay at or near the location of the meeting to enjoy vacation there. Some people prefer to do what you assinuate: meet others face-to-face.

10

u/Disastrous-Jaguar541 5d ago • Bravo

I am speaking as an outsider, but my understanding is quite different from yours, My understanding is that an overwhelming majority o the WG wanted contracts in, with objections from a small but potent group, including Bjarne Stroustrup.

That minority then tried to force its will by convincing a group of national bodies that until this point had no objection to contracts to vote no. It is this minority that faces credibility issues.