C++ Standards – How the C++ Standards Committee Tests Design Ideas

clanguage-designstandards

Does the C++ committee test their new design specifications with some sort of prototype compiler before releasing a new standard? Or do they release a standard which is, in effect, only theoretical until the big compilers implement it?

Best Answer

The C++ Standard Committee has bylaws and rules, but most of these are centered around the structure of the organization, how to submit proposals, voting, publishing the standard, etc. and not so much on the technical details of the standard itself or how it may be tested.

There is no formal requirement for "testing" a feature or its design as far as I know. C++ is also somewhat unique in that there is no reference or "primary" implementation (e.g. Microsoft CLR, Oracle JDK, Zend PHP). However, the committee members consist of many organizations with deep knowledge of the language and compiler implementation. For example, if you follow that previous link, you will see representatives from Microsoft and Intel who both have well-respected C++ compilers. Red Hat and a few other companies who contribute to GCC are also involved.

When proposing a new feature, committee members already have a pretty good idea as to whether it is feasible, if it may conflict with other features, or cause the grammar to be ambiguous in a way that complicates parsing unnecessarily. (here is a good question about C++'s grammar)

The short answer is "no, the committee does not require testing their designs using prototyping." However, there is not much need because the committee members are experts in C++ who understand all the fine details at a level that the vast majority of programmers do not. Remember, these people are language architects who are experts on language theory and compiler design.

Given the involvement of compiler vendors in the process, it is feasible that one or more of them may prototype a new feature, but again, there is no formal requirement for this nor is it something I have read about in publicly-available documents from the C++ Committee.

They also tend to be very conservative, incrementally adding new features that have a demand in the real world without specifying large amounts of new features that may prove to be risky. In fact in recent years they have added new features that existed as proprietary extensions or open-source libraries that already work in the real world. For example, C++11 and C++14 incorporate parts of Boost, which has already been tested in the real world in multiple compilers and execution environments. There is no need to test something that is already tested.

Related Topic