Skip to main content
foonathan u/foonathan avatar

foonathan

u/foonathan

Feed options
Hot
New
Top
View
Card
Compact

Ah, I'm not sure whether there would be two different handlers or whether they're unified.

I was talking about linking "observe" with "ignore" which for static linking can cause inline functions to change the contract behavior.


See also how the vote to have no C++26 at all had higher consensus than the vote to have C++26 without contracts.

Many people just wanted to get on with it and either appease the NBs by pulling contracts out of C++26 (keeping them unchanged in the draft for C++29, mind you) or by making it moot by cancelling C++26 all together.

Also note that the vote was preceded by multiple implementers saying that regardless of outcome of the votes, compilers will ship -std=c++26 with contracts in them.


I don't think DLLs cause an issue here.

The issue with mixed mode is when you link translation units A with checks and translation unit B without and then the linker replaces an inline function definition from A with one from B, removing the checks. That doesn't happen with DLLs: the main program will get whatever contract policy they set and so does the DLL.


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".


I find it odd too, but apparently some NBs were adamant to have them bundled. And it's more important to appease four guys in Romania than to decide things on a purely technical basis.


My point is that you work to create consensus within WG21 but then the NBs can still shoot things down. So why bother with the first step if none of the decisions matter in the end?

Just directly ask the NBs about everything without discussion and do whatever they want.


Because people want features regardless of whether they're in an ISO PDF?


Yes. And my point is: why would you bother participating in WG21 if consensus there doesn't matter at all?