A common C/C++ core specification

I just published a new document on the WG14 (C committee) site

N2494: A common C/C++ core specification

It is attempt to push the fast-forward button to the annoyingly slow development process for C and its coordination with C++.

The C and C++ programming languages have evolved from a common
ancestor many years ago and have always been developed in keeping a close eye on each other. Both responsible committees, WG14 and WG21, have always sought both languages to be compatible as far as seemed possible; on a binary level for mutual linkage of software components, and on a source-header level for mutual access to the so linked components. Nevertheless, gratuitous incompatibilities have crept into them, and cross-language programming is nowadays quite difficult to achieve and almost impossible to teach.

On the positive side, in recent years the efforts to bridge the gap between the two language have been renewed and several fruitful initiatives have been undertaken to unify the approaches in several domains. These concern in particular atomic types and operations, sign representations of integers, the memory model(s), and the attribute feature.

This specification is an attempt to strengthen these dynamics and to formulate a common language core that ideally would be integrated in both languages and would provide a solid base for the future development of both, and, that would be much simpler to use, to comprehend and to implement. It is oriented to maintain and extend some principal characteristics that are already present in the intersection:

    • Strong static typing
    • Type-genericity
    • Efficiency
    • Portability

 

 

This common core adds features to both languages, and thus it has not yet a complete implementation. Nevertheless, first experiments show that it should not be very complicated to provide reference implementations within compiler frameworks that already have front-ends for both languages, and that thus already have most of the features in one way or another.

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.