C++ Logo


Advanced search

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

From: Ville Voutilainen <ville.voutilainen_at_[hidden]>
Date: Fri, 24 Sep 2021 18:32:13 +0300
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 http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2016/p0287r0.pdf
> 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 10:32:27