C++ Logo

liaison

Advanced search

Re: [wg14/wg21 liaison] [isocpp-sg21] Telecon to review P2388R1 Minimum Contract Support: either Ignore or Check_and_abort

From: Gabriel Dos Reis <gdr_at_[hidden]>
Date: Fri, 24 Sep 2021 16:25:59 +0000
[Ville]
> Gaby, I must wonder whether your definition of "ignorable" is
> different from Jens's. To me, a requirement that
> a contract is syntax-checked and entities referred in it odr-used
> doesn't allow for anything that I would describe
> as "ignoring".

I suspect both Jens and I are have the same understanding of "ignorable".
If the program is correct, then it didn't violate any diagnosable rule, consequently ignoring them would not violate any diagnosable rule.

Am I misunderstanding the point you're hinting at? Any example to help?

-- Gaby


-----Original Message-----
From: Ville Voutilainen <ville.voutilainen_at_[hidden]>
Sent: Friday, September 24, 2021 8:32 AM
To: SG21 <sg21_at_[hidden]>
Cc: Jens Maurer <Jens.Maurer_at_[hidden]>; Aaron Ballman <aaron_at_[hidden]>; Gabriel Dos Reis <gdr_at_[hidden]>; WG14/WG21 liaison mailing list <liaison_at_[hidden]>
Subject: Re: [isocpp-sg21] [wg14/wg21 liaison] Telecon to review P2388R1 Minimum Contract Support: either Ignore or Check_and_abort

On Fri, 24 Sept 2021 at 18:24, Gabriel Dos Reis via SG21
<sg21_at_[hidden]> wrote:
> > That seems an interesting observation. The discussion so far seems to have
> > assumed that contracts are not ignorable in the attribute sense.
>
> That observation was at the basis of the current syntax, suggested going all the way back to https://nam06.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.open-std.org%2Fjtc1%2Fsc22%2Fwg21%2Fdocs%2Fpapers%2F2016%2Fp0287r0.pdf&amp;data=04%7C01%7Cgdr%40microsoft.com%7C9b4ab52e69b34ae14c1a08d97f7082ba%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637680943487924391%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&amp;sdata=TwphCEpnorPSRf687GeWX2ZQnsV1V86eDGUPFVBse4o%3D&amp;reserved=0
>
> We are designing contracts not so much for the correct programs behaving correctly (like I said, you can ignore contracts for them and they will continue to do just fine.) We are designing contracts as a mitigation measure for the misbehaving programs. Quoting the introduction of the above paper:
>
> >>> Contracts are not a general error reporting mechanism, nor are they substitute for testing frameworks.
> >>> Rather, they offer a basic mitigation measure when a program goes wrong because of mismatch of
> >>> expectations between parts of a program.

Gaby, I must wonder whether your definition of "ignorable" is
different from Jens's. To me, a requirement that
a contract is syntax-checked and entities referred in it odr-used
doesn't allow for anything that I would describe
as "ignoring".

Received on 2021-09-24 11:26:06