C++ Logo

liaison

Advanced search

Re: [wg14/wg21 liaison] Designated initializers in C++ and C

From: Uecker, Martin <Martin.Uecker_at_[hidden]>
Date: Thu, 13 Aug 2020 09:08:05 +0000

Hi Bjarne,

Am Mittwoch, den 12.08.2020, 22:08 +0200 schrieb Bjarne Stroustrup via
Liaison:
>
> > Hm, that looks as if WG21 implemented a completely different
> > feature than WG14:(
>
> And W14 implemented differing definitions of inline, complex, and
> const, after years of use in C++. Compatibility is seriously hard
> and there is a lot of history to this. Please remember that some of
> us have tried to keep up with the C standards effort since before
> the 1989 standard. With two different standards and two different
> groups of people maintaining them, we will continue to get a number
> of deliberate and accidental incompatibilities. I have dreamed of a
> merger of C and C++ since the late 1980s, and I am not alone, but
> there are enough people (on both sides) insisting on
> incompatibilities that I am not optimistic about that.

I think this would be a vary important discussion to have.

To me a merger seems difficult. I fear that C would loose its
identity and essentially cease to exist.
C is is maintained by a separate working group, has
different use cases, and serves a different group of users.
I can not see that this can work if it also is required
to be a subset of C++.

On the other hand, one could try to agree on a common
core language that is both a subset of C++ and C
and let both languages build on top of this common
core. For this to work, such a core would need to be
maintained by both WG14 and WG21 (i.e. a common
subgroup). It would also be important to clearly
define the scope of this common core.

(Jens Gustedt has a proposal in this direction,
although it is already very large and contains
many extensions. But his proposal already covers a
lot of the common ground and also discusses many of
the remaining differences.)

In any case, I think a lot of the friction is caused
because there are different opinions about what
compatibility of C and C++ actually means
and what we want to achieve here. The first step to
make this run smoother in the future is to have a
clearer consensus about this.

Best,
Martin









Received on 2020-08-13 04:11:33