Date: Fri, 3 Oct 2025 21:07:27 +0000
[Herb]
* Microsoft+Bloomberg on how contracts light up static analysis for CodeQL
In the interest of clarity and avoid any obfuscation, the talk that Herb is referencing is not the Microsoft’s position, as an INCITS voting member, or as provider of the C++ toolset that it delivers to its customers.
-- Gaby
From: Ext <ext-bounces_at_[hidden]> On Behalf Of Herb Sutter via Ext
Sent: Thursday, October 2, 2025 1:51 PM
To: sg15_at_lists.isocpp.org; sg21_at_[hidden]; 'Michael Spencer' <bigcheesegs_at_[hidden]>; ext_at_[hidden]
Cc: Herb Sutter <herb.sutter_at_[hidden]>
Subject: Re: [isocpp-ext] [isocpp-sg15] [isocpp-admin] Swedish mirror committee consideration on the current working draft
Pinging Michael S, do you have a comment on the SG15 summary below — did I hear/understand correctly? (Sorry if this is catching you while out of office.)
Herb
P.S.: FYI, my CppCon contracts talks two weeks ago is now live<https://herbsutter.com/2025/10/01/my-other-cppcon-talk-video-is-now-available-the-joy-of-c26-contracts-and-some-myth-conceptions/> – my aim was to provide a complete summary of the current design (3 slides, 15-17) and all the usage guidance I know (5 slides, 21-25), plus to present all the main “for” and “against” arguments/concerns. Thank you to all the experts who answered my questions. All errors and omissions are mine.
Also at CppCon:
* There was also another talk by Microsoft+Bloomberg on how contracts light up static analysis for CodeQL. That video is not yet available but I’ll post a link when it is — hopefully in the next week.
* Daisy Hollman (now at Anthropic) mentioned some new information that AFAIK we didn’t previously consider, that contracts is very important for AI. We’ve asked if she would write it up as a short paper, if she has time.
From: Herb Sutter <herb.sutter_at_[hidden]<mailto:herb.sutter_at_[hidden]>>
Sent: Tuesday, September 30, 2025 11:53 AM
To: 'sg15_at_[hidden]ocpp.org' <sg15_at_[hidden]<mailto:sg15_at_[hidden]>>; 'sg21_at_[hidden]' <sg21_at_[hidden]<mailto:sg21_at_[hidden]>>; 'Michael Spencer' <bigcheesegs_at_[hidden]<mailto:bigcheesegs_at_[hidden]>>
Cc: 'René Ferdinand Rivera Morell' <grafikrobot_at_[hidden]<mailto:grafikrobot_at_[hidden]>>
Subject: RE: [isocpp-sg15] [isocpp-admin] Swedish mirror committee consideration on the current working draft
This reminds me, I wanted to +Michael to ask for a fact-check:
Michael, I’ve been told by several people that when SG15 (tooling) did discuss contracts and build systems at a recent meeting, no one in the room raised any objections, including experts in the room who were and are opposed to contracts in C++26.
Is that summary correct? Please correct if I’m misinformed or misunderstood!
From: SG15 <sg15-bounces_at_lists.isocpp.org<mailto:sg15-bounces_at_[hidden]>> On Behalf Of René Ferdinand Rivera Morell via SG15
Sent: Tuesday, September 30, 2025 11:26 AM
To: sg21_at_[hidden]p.org<mailto:sg21_at_[hidden]>; ISO C++ Tooling Study Group <sg15_at_[hidden]<mailto:sg15_at_[hidden]>>
Cc: René Ferdinand Rivera Morell <grafikrobot_at_gmail.com<mailto:grafikrobot_at_[hidden]>>
Subject: Re: [isocpp-sg15] [isocpp-admin] Swedish mirror committee consideration on the current working draft
On Wed, Sep 24, 2025 at 8:36 AM René Ferdinand Rivera Morell <grafikrobot_at_[hidden]<mailto:grafikrobot_at_[hidden]>> wrote:
On Wed, Sep 24, 2025 at 6:10 AM Harald Achitz via Admin <admin_at_[hidden]<mailto:admin_at_[hidden]>> wrote:
The Swedish SC22 mirror committee TK611/AG09 has discussed the current
working draft of C++26 and identified concerns regarding contract
assertions. We have summarized these in the attached document.
As convener, I see it as my duty to mediate these concerns. I would
therefore appreciate guidance on how to proceed and to ensure that our
experts’ concerns, as well as similar concerns from others, are taken
into account.
From the comments:
Contracts introduce several new build configurations. The impact on the build system and binary
dependency management has not received sufficient focus.
I wanted to address the fears regarding build systems. But I didn't have time to write up implemented examples until yesterday. Last night I implemented Contracts build support for B2 (aka Boost.Build). It took me less than an hour to implement that support. The parts of that are these segments (the rest are documentation comments and examples):
<https://github.com/bfgroup/b2/commit/3b20a4e16594b19a38f006a7af051c775bf0e1c9#diff-0fc008a10b15f249e1b7f2dffc067eadae061007e7b8a83122cb6a562ce0de11R20-R24>
<https://github.com/bfgroup/b2/commit/3b20a4e16594b19a38f006a7af051c775bf0e1c9#diff-0fc008a10b15f249e1b7f2dffc067eadae061007e7b8a83122cb6a562ce0de11R45-R48>
<https://github.com/bfgroup/b2/commit/3b20a4e16594b19a38f006a7af051c775bf0e1c9#diff-33537906d8dfd13afc76c7734b09d22c4d7716e45250cefc65ae2086b26e560cR719-R724>
I also created a simple example showing the matrix of using static vs dynamic linking a library with contracts, vs enforce/ignore semantics on main(), vs enforce/ignore semantics on the library. That's in this repo <https://github.com/grafikrobot/cpp_contracts_example>.
The comparison I like to raise with that is that I have yet to implement Modules support in B2 because that has-taken / is-taking serious amount of reengineering.
--
-- René Ferdinand Rivera Morell
-- Don't Assume Anything -- No Supongas Nada
-- Robot Dreams - http://robot-dreams.net<http://robot-dreams.net/>
* Microsoft+Bloomberg on how contracts light up static analysis for CodeQL
In the interest of clarity and avoid any obfuscation, the talk that Herb is referencing is not the Microsoft’s position, as an INCITS voting member, or as provider of the C++ toolset that it delivers to its customers.
-- Gaby
From: Ext <ext-bounces_at_[hidden]> On Behalf Of Herb Sutter via Ext
Sent: Thursday, October 2, 2025 1:51 PM
To: sg15_at_lists.isocpp.org; sg21_at_[hidden]; 'Michael Spencer' <bigcheesegs_at_[hidden]>; ext_at_[hidden]
Cc: Herb Sutter <herb.sutter_at_[hidden]>
Subject: Re: [isocpp-ext] [isocpp-sg15] [isocpp-admin] Swedish mirror committee consideration on the current working draft
Pinging Michael S, do you have a comment on the SG15 summary below — did I hear/understand correctly? (Sorry if this is catching you while out of office.)
Herb
P.S.: FYI, my CppCon contracts talks two weeks ago is now live<https://herbsutter.com/2025/10/01/my-other-cppcon-talk-video-is-now-available-the-joy-of-c26-contracts-and-some-myth-conceptions/> – my aim was to provide a complete summary of the current design (3 slides, 15-17) and all the usage guidance I know (5 slides, 21-25), plus to present all the main “for” and “against” arguments/concerns. Thank you to all the experts who answered my questions. All errors and omissions are mine.
Also at CppCon:
* There was also another talk by Microsoft+Bloomberg on how contracts light up static analysis for CodeQL. That video is not yet available but I’ll post a link when it is — hopefully in the next week.
* Daisy Hollman (now at Anthropic) mentioned some new information that AFAIK we didn’t previously consider, that contracts is very important for AI. We’ve asked if she would write it up as a short paper, if she has time.
From: Herb Sutter <herb.sutter_at_[hidden]<mailto:herb.sutter_at_[hidden]>>
Sent: Tuesday, September 30, 2025 11:53 AM
To: 'sg15_at_[hidden]ocpp.org' <sg15_at_[hidden]<mailto:sg15_at_[hidden]>>; 'sg21_at_[hidden]' <sg21_at_[hidden]<mailto:sg21_at_[hidden]>>; 'Michael Spencer' <bigcheesegs_at_[hidden]<mailto:bigcheesegs_at_[hidden]>>
Cc: 'René Ferdinand Rivera Morell' <grafikrobot_at_[hidden]<mailto:grafikrobot_at_[hidden]>>
Subject: RE: [isocpp-sg15] [isocpp-admin] Swedish mirror committee consideration on the current working draft
This reminds me, I wanted to +Michael to ask for a fact-check:
Michael, I’ve been told by several people that when SG15 (tooling) did discuss contracts and build systems at a recent meeting, no one in the room raised any objections, including experts in the room who were and are opposed to contracts in C++26.
Is that summary correct? Please correct if I’m misinformed or misunderstood!
From: SG15 <sg15-bounces_at_lists.isocpp.org<mailto:sg15-bounces_at_[hidden]>> On Behalf Of René Ferdinand Rivera Morell via SG15
Sent: Tuesday, September 30, 2025 11:26 AM
To: sg21_at_[hidden]p.org<mailto:sg21_at_[hidden]>; ISO C++ Tooling Study Group <sg15_at_[hidden]<mailto:sg15_at_[hidden]>>
Cc: René Ferdinand Rivera Morell <grafikrobot_at_gmail.com<mailto:grafikrobot_at_[hidden]>>
Subject: Re: [isocpp-sg15] [isocpp-admin] Swedish mirror committee consideration on the current working draft
On Wed, Sep 24, 2025 at 8:36 AM René Ferdinand Rivera Morell <grafikrobot_at_[hidden]<mailto:grafikrobot_at_[hidden]>> wrote:
On Wed, Sep 24, 2025 at 6:10 AM Harald Achitz via Admin <admin_at_[hidden]<mailto:admin_at_[hidden]>> wrote:
The Swedish SC22 mirror committee TK611/AG09 has discussed the current
working draft of C++26 and identified concerns regarding contract
assertions. We have summarized these in the attached document.
As convener, I see it as my duty to mediate these concerns. I would
therefore appreciate guidance on how to proceed and to ensure that our
experts’ concerns, as well as similar concerns from others, are taken
into account.
From the comments:
Contracts introduce several new build configurations. The impact on the build system and binary
dependency management has not received sufficient focus.
I wanted to address the fears regarding build systems. But I didn't have time to write up implemented examples until yesterday. Last night I implemented Contracts build support for B2 (aka Boost.Build). It took me less than an hour to implement that support. The parts of that are these segments (the rest are documentation comments and examples):
<https://github.com/bfgroup/b2/commit/3b20a4e16594b19a38f006a7af051c775bf0e1c9#diff-0fc008a10b15f249e1b7f2dffc067eadae061007e7b8a83122cb6a562ce0de11R20-R24>
<https://github.com/bfgroup/b2/commit/3b20a4e16594b19a38f006a7af051c775bf0e1c9#diff-0fc008a10b15f249e1b7f2dffc067eadae061007e7b8a83122cb6a562ce0de11R45-R48>
<https://github.com/bfgroup/b2/commit/3b20a4e16594b19a38f006a7af051c775bf0e1c9#diff-33537906d8dfd13afc76c7734b09d22c4d7716e45250cefc65ae2086b26e560cR719-R724>
I also created a simple example showing the matrix of using static vs dynamic linking a library with contracts, vs enforce/ignore semantics on main(), vs enforce/ignore semantics on the library. That's in this repo <https://github.com/grafikrobot/cpp_contracts_example>.
The comparison I like to raise with that is that I have yet to implement Modules support in B2 because that has-taken / is-taking serious amount of reengineering.
--
-- René Ferdinand Rivera Morell
-- Don't Assume Anything -- No Supongas Nada
-- Robot Dreams - http://robot-dreams.net<http://robot-dreams.net/>
Received on 2025-10-03 21:07:34