C++ Logo

liaison

Advanced search

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

From: Timur Doumler <cpp_at_[hidden]>
Date: Fri, 6 Oct 2023 19:32:12 +0300
> On 6 Oct 2023, at 19:28, Jens Maurer <jens.maurer_at_[hidden]> wrote:
>> If that is indeed the case, then the attribute-like syntax for Contracts would not be ignorable in C, either.
>
> Right, but the argument is that implementations can add the small extension
> to parse-ignore ":" in that spot right now, and then be future-proof for
> ignoring future attribute-like contracts.

Right. Yes, I can follow that argument. But that begs the question: what is so special or different about Contracts that you want this feature in particular to be backwards-compatibly-ignorable by older compilers, considering that we don't do that for any other new language feature where we add new syntax to the language?

Cheers,
Timur

Received on 2023-10-06 16:32:16