C++ Logo

liaison

Advanced search

Re: [wg14/wg21 liaison] P2961R1 syntax for Contracts: viable for C?

From: Ville Voutilainen <ville.voutilainen_at_[hidden]>
Date: Sat, 7 Oct 2023 17:29:34 +0300
On Sat, 7 Oct 2023 at 17:21, Timur Doumler <cpp_at_[hidden]> wrote:

> Yes. If you want this "function-like macro syntax" as the primary standard contracts syntax for C++, then someone (not me :) would have to actually write a paper, formally proposing that.

P2961 is already such a syntax, for the near-term scope of it. The
ostensible extensions of it aren't, but that may change if we choose
to keep
the feedback given here in mind.

>But even if someone wrote such a paper, and even if we waive the deadlines on submitting new Contracts syntax proposals that we have set

We don't need to waive any deadlines, there's nothing in P2961's
content for C++26 that is macro-unfriendly. Everything in it is
"pre/post(something)",
there are no prefix-brackets or any "pre<magic>/post<magic>" bits in
it, just possibly in its future extensions. And those extensions
aren't
set in stone, and can change.

Received on 2023-10-07 14:29:48