C++ Logo

sg15

Advanced search

Re: [isocpp-sg15] [isocpp-sg21] P3835 -- Different contract checking for different libraries

From: Oliver Rosten <oliver.rosten_at_[hidden]>
Date: Fri, 17 Oct 2025 14:12:47 +0100
As someone who does a huge amount of teaching, I'm not sure I share the
concerns about the teachability of Observe.

Indeed, I think the zeroth order teaching concern is getting people to
understand that (in my opinion) Contracts as a whole are a tool to be used
judiciously.

If you're thinking of using Contracts without ever having thought propeply
about whether your functions have wide or narrow contracts (plenty
never have, in my experience) don't start rolling it out across your code
base.

If you have given this thought before, or start thinking about it, then
work out where contracts are appropriate.

Treat Observe as an expert-level feature. Only consider using it when you
have some confidence that you know what you're doing.

In a different, but related thread, Louis gave a great example of how to
use Observe effectively when you have the expertise to do so.

O.

On Fri, 17 Oct 2025 at 13:53, JOSE DANIEL GARCIA SANCHEZ via SG21 <
sg21_at_[hidden]> wrote:

> Some degree of consensus does not prevent problems arising in production
> code.
>
> On Fri, Oct 17, 2025 at 2:00 PM René Ferdinand Rivera Morell <
> grafikrobot_at_[hidden]> wrote:
>
>> On Fri, Oct 17, 2025 at 6:37 AM JOSE DANIEL GARCIA SANCHEZ via SG15 <
>> sg15_at_[hidden]> wrote:
>>
>>> About concern 10 (aka ES-047), please note that saying we discussed this
>>> before does not solve the problem.
>>>
>>
>> It shows that the choice was made by consensus.
>>
>> --
>> -- René Ferdinand Rivera Morell
>> -- Don't Assume Anything -- No Supongas Nada
>> -- Robot Dreams - http://robot-dreams.net
>>
>> _______________________________________________
> SG21 mailing list
> SG21_at_[hidden]
> Subscription: https://lists.isocpp.org/mailman/listinfo.cgi/sg21
> Link to this post: http://lists.isocpp.org/sg21/2025/10/11330.php
>

Received on 2025-10-17 13:13:04