Evolution of C++ standards

Posted by on in Blogs

Programming languages are exciting for developers, and C++, one of the more technically challenging and also perhaps the most widely used compiled language, is one of the most exciting.  As Theodore Roosevelt is misquoted (*), 'the more you know about the past, the better prepared you are for the future,' so let’s dive into a bit of C++ history and how it’s shaped our coding today. 

Many people may know that C++ grew out of C language extensions, started by Bjorne Stroustrup in 1979.  You might even know of the first C++ compiler, Cfront, which compiled what was originally ‘C with classes’ to C, which was then compiled itself.  Cfront was eventually dropped because the language grew too complex to compile to C. But in today’s world of fast-moving language standards, C++17 and C++20, you might not know that it took almost two decades until 1998 for the language to have its first standards published.

Let’s have a quick look at the history of C++ standards and where our product, C++Builder, fits in today.

Standardization

For many years, the de facto standard for C++ was not in written form, but in the form of a compiler: Cfront.  If it compiled, it was valid C++.  In 1985 Stroustrup published The C++ Programming Language, the first edition of what is still today regarded as the canonical C++ reference book, and this augmented Cfront such that the pair were the de facto standard for AT&T C++. This was replaced by The Annotated C++ Reference Manual in 1990.

Languages are often ‘owned’ by a single individual or group, who defines the language specification.  If a single group owns the compiler and libraries, no open spec is required; if instead there are multiple implementations, a shared common specification is essential for compatibility.  In a forward-looking and humble move, Stroustrup handed over the language to the International Organization for Standardization, ISO.

How did we get from a compiler and reference book to a ISO standard?

A number of things all happened around 1990:

  • The Annotated C++ Reference Manual was released
  • Turbo C++, the ancestor of today’s C++Builder, was released, and “added a plethora of additional libraries which would have a considerable impact on C++'s development.”
  • The same month, the first ANSI C++ meeting was held
  • In 1991, the first ISO C++ meeting

It was a time of great progress.

Since then, there have been five standardized specifications of C++ released.

The First Standard: 1998

The first ISO C++ standard was released in 1998, and it formed what today is still the basic C++ many people learn at University. It codified C++ including the STL, with a baseline of C++ features: RTTI and dynamic_cast, many template features, and so forth (note that many of these had been de-facto or widely used before 1998.)

It surprises many people who regard a language and supporting libraries as separate, but today much of the C++ standard is not only the language per se, but the standard library and its behaviour.

In 2003, the standard was updated to C++03. (Keen-eyed readers may have noted that C++98 dates from 1998 and C++03 from 2003, and this two-digit year-based naming convention continues today. This means ‘17 is newer than ‘98.) Unless you delve deeply into the standard, C++98 and C++03 are regarded as, effectively, the same thing.  C++03 solves several issues in C++98, but to a programmer who uses the language, the core was defined in the 1998 standard. 

Fast-forward to Standard #3: C++11

C++03 was a powerful language, but for several years the language was regarded as stagnating, with no new key revisions.  (Remember that C++03 was a minor change.)  Innovation was driven by libraries, especially Boost and the technical report libraries, both of which were closely related to the standards committee.  In the second half of the 2000s, this changed and finally in August 2011, the imaginatively named C++11 standard was released.

C++11 brought in many core features.  Among them are lambdas (function objects), type inference (auto keyword), constexpr, and more.  Today, C++Builder supports C++11 for Windows, iOS and Android.

In 2014, C++14 was released.  While C++14 made incremental updates to C++11, it also brought in several new features as well as new library functions.

C++11, ‘modern C++’, especially in its polished C++14 form, drove a renaissance in C++ development.  The current excitement around language features and new standards is largely driven by the success of this version of C++, and the demonstration of the leadership and direction taken by the committee. The language was regarded as back to fast progress, as it had been some years before.

Standard #5: C++17

Since the resurgence in C++ interest after C++11 and C++14, the committee has been moving quickly to further improve the language.

This resulted in C++17, the next large revision, in December last year.

C++17 brings many new changes, including template deduction of constructors, inline variables, preprocessor directives for checking header availability, improved constant evaluation for template arguments, parallel STL algorithms, a union type (std::variant), and many other library improvements including std::string_view.  Anecdotally, string_view is one of the most-discussed C++17 topics in programming forums.

C++Builder’s Language Support and Innovations

Where is C++Builder today?

C++Builder’s ancestor products, Turbo C++ and Borland C++, were key to the foundations of C++, the development of the STL, and the first revisions of the standard.

Today, C++Builder supports modern C++11, and support for C++17 is in development.  C++Builder has also innovated a number of C++ extensions, such as __closure to capture an object-method pointer (considerably more flexibly than the combination std::func and std::bind), and __property for abstracting object’s logical, non-field-backed, properties - these can be backed by methods, have default values, and can be used for RTTI reflection and streaming. Of course, these language features are completely optional and you can use pure C++ if you wish.  These extensions enable some of our most powerful libraries, and work in combination with FireMonkey, a GPU-accelerated cross-platform UI framework; FireDAC, a very elegant cross-platform database technology supporting any database you need; and many other frameworks and features for app communication, visual design, and more.

 

You can learn more about the history of C++ in the linked references below, or get started with a FREE 30 Day Trial of C++Builder today. 

References

 (*) Roosevelt is commonly quoted as saying, 'The more you know about the past, the better prepared you are for the future.' One exact quote of his, perhaps the source of the previous, is 'Full knowledge of the past helps us in dealing with the future.' -- The Progressives, Past and Present (1910).

 



About
Gold User, No rank,
C++ Product Manager, looking after C++Builder as well as the IDE.

Comments

  • Anthony B54944
    Anthony B54944 Wednesday, 30 May 2018

    David, can you say more about plans for the macOS compiler and C++ language standards? The Windows Clang compiler supports C++ 11, but the macOS one doesn't, which means RAD Studio effectively doesn't support C++ 11 if you're doing cross-platform development including macOS. Some clarity about the plans going forward would be much appreciated.

  • David Millington
    David Millington Thursday, 31 May 2018

    Yes, I understand the problem with macOS right now. I can't comment further publicly at the moment, but I'd really appreciate it if you could email me with your concerns and needs please. Firstname dot lastname at embarcadero.com.

  • Please login first in order for you to submit comments
  • Page :
  • 1

Check out more tips and tricks in this development video: