Trip Report: October-December 2003

This winter's C and C++ Standards meetings brought some surprising-and historic-cooperation and collaboration.


April 01, 2004
URL:http://www.drdobbs.com/trip-report-october-december-2003/184401790

April 04: Trip Report: October-December 2003

Wow. What a historic turning point this winter has turned out to be, as you'll discover in this column where I report on three Standards meetings:

The C and C++ Standards meetings were hosted by Plum Hall in Kona, Hawaii, in October 2003. The ISO C and C++ committees meet twice a year, in the spring and fall, on consecutive weeks in the same location. For the past two years, I have been attending both C and C++. (Yes, that's a month per year out of my life. Please don't remind me.)

The first C++/CLI Standards meeting was hosted by Microsoft and Plum Hall in College Station, Texas, in December 2003. C++/CLI plans to meet a total of about seven times between December 2003 and September 2004 for two to three days each. (No, I don't even want to think about what fraction of my life that is, especially after you add in the travel days before and after each meeting.)

Here are the highlights of the meetings:

The C Meeting

The C committee is purposely stabilizing the C99 Standard in a holding pattern with no new active development underway on the language itself. That makes sense; as of this writing, there is exactly one fully conforming implementation of C99 on the planet (unsurprisingly, it's by Edison Design Group). Instead, the C committee is doing work in nonnormative Technical Reports (TRs). It has just finished up two such TRs, one on embedded systems extensions and another on character data-type extensions.

At this meeting, the C committee laid the groundwork to launch three new TRs. One of them is on C++ Standard Library security that is based on the past few years' work at Microsoft.

The other two TRs are directly related to C/C++ convergence:

The C++ Meeting

Turning now to C++, first let me give some pointers to put this meeting in context. Here is a quick summary of the prior two C++ meetings and pointers to where you can find further information about them:

Now I'll focus on C++. The C++ committee has recently completed three major work items that have been ongoing for the past five years:

That leaves three major active work items, two of them preexisting going into this meeting, and one adopted at this meeting:

Note the division of work between the Library TR and the Evolution WG: The former deals with library-only extensions that do not require additional language support, and the latter deals with proposals that require language extensions to do well. Some items may be accepted into the Library TR as "hackaround" extensions that work around today's C++ language limitations. If and when the EWG closes those holes with better language extensions, the library hackarounds can be refined or abandoned.

Here are the highlights of what happened at this meeting.

C++ Library TR: Nearing Completion — and Adopting the C99 Library Wholesale

At the previous two meetings (Santa Cruz and Oxford), the first 12 library extensions were approved for the Library TR.

Perhaps most notably, the group agreed in principle to adopt wholesale all of the new facilities that were added in the C99 Standard Library, thereby resynchronizing the C++ Standard Library with the most current C Standard Library. C++ has historically been based on C89, and so didn't have snprintf and other functions that are new in C99. Until now. P.J. Plauger will be bringing an updated paper to the next meeting (Sydney), which is expected to adopt it.

With the aforementioned, the library working group is now closing the door on additional proposals for this TR, and plans to spend the next two or three meetings to refine this content into publishable form. New proposals are still welcome, but will be queued up for a possible second Library TR or for C++0x itself.

C++ Evolution Working Group

The C++ Evolution Working Group (EWG) is still early into the C++0x work and continues to make steady progress. Many proposals were discussed and will be further refined, including support for concept checking for templates. Two particular proposals that were well received that bear on collaboration with other standards bodies are:

The C++/CLI Meeting

The final standards process that was just getting started at the time of this ISO C++ meeting was ECMA C++/CLI.

My main day job for the past year and some has been to lead the design team at Microsoft that is revising (well, completely overhauling) the Managed Extensions to C++ for .NET (CLI) programming. ECMA C++/CLI is standardizing those revised extensions. They make developing for the CLI/.NET platform in C++ a first-class experience, just as easy as in Those Other Languages you may have heard about that might sometimes claim to be the Last Word on that platform.

Needless to say, it's essential that this C++/CLI work exist and be elegant and usable, so that C++ is ensured first-class representation on important platforms. It's also essential that this work be true to ISO C++ — that is, not only true to the existing C++ Standard, but also that it not impede ISO C++0x evolution that is now underway and will stay underway for the next few years. There's one major reason for confidence that all of this will happen and that C++/CLI will do the right thing: The C++/CLI work is being done by a subset of the ISO C++ committee with a healthy (complete) respect for both of today's ISO C++ and ISO C++0x now under construction.

The attendees at the first C++/CLI meeting were: Dinkumware (P.J. and Tana Plauger), Edison Design Group (Steve Adamczyk and John Spicer), IBM (Sean Perry), Microsoft (myself, Brandon Bray, Rex Jaeschke, and Mark Hall, who was the principal designer of the original Managed Extensions), Plum Hall (Tom Plum), Bjarne Stroustrup, and Gabriel Dos Reis. In addition, we also had Jan van den Beld, ECMA's secretary-general, to lend a much-appreciated helping hand with information and advice.

This first meeting was mainly organizational, and organize it did: The C++/CLI and C++ committees have now set up official e-mail and in-person collaboration, in addition to their already broadly overlapping membership. Over the coming months, we will continue to work closely with C++/CLI and C++ to ensure compatibility and craft high-quality support for C++ on important modern platforms, including garbage collection, reflection, serialization, and all the other bells and whistles that are part of CLI.

Summary

C and C++ are actually actively converging and adopting each other's work. C++ and C++/CLI are actively collaborating to respect C++ evolution and craft high-quality C++ language extensions that will help to ensure C++'s continued relevance, nay supremacy, on important platforms.

What's this — cooperation and collaboration busting out everywhere? Was there something in the Kona water? Won't the sudden euphoria wear off? Is there no fly in the idyllic ointment anywhere to be found, no chill in the summery breeze of happy harmony? Nope, there are no flies or chills at the moment, and it's a welcome breath of fresh air that will benefit C and C++ programmers on all platforms as C, C++, and even their extensions begin and continue to actively converge.

Yes, what a historic turning point this winter has turned out to be.

References

[1] Sutter, H. "Trip Report: October 2002" (C/C++ Users Journal, 21(2), February 2003). Available online at http://www.cuj.com/documents/cujcexp2102sutter/.

[2] Sutter, H. "Tuples" (C/C++ Users Journal, 21(6), June 2003). Available online at http://www.cuj.com/documents/cujcexp2106sutter/.

[3] Sutter, H. "Generalized Function Pointers" (C/C++ Users Journal, 21(8), August 2003). Available online at http://www.cuj.com/documents/cujcexp0308sutter/.

[4] Sutter, H. "Generalizing Observer" (C/C++ Users Journal, 21(9), September 2003). Available online at http://www.cuj.com/documents/cujexp0309sutter/.

[5] Sutter, H. "Trip Report: April 2003" (C/C++ Users Journal, 21(10), October 2003). Available online at http://www.cuj.com/documents/cujexp0310sutter/.

[6] http://wwww.gotw.ca/iso.

[7] http://www.boost.org/.

[8] There is a little more administrative detail than that, because oddly enough ISO actually has no formal process for two committees like C and C++ to actually work together like this. Go figure! So John Benito (the C convener) and I (the C++ convener) are setting up a structure whereby we'll be effectively working together anyway, so there, effectively working around and cutting through the ISO red tape. At the end of the process, C and C++ will issue its own Decimal Arithmetic TR, and the two will be identical except only for hopefully a small number (if any) of C- and C++-specific parts.


Herb Sutter (http://www.gotw.ca/) is convener of the ISO C++ Standards committee, author of Exceptional C++ and More Exceptional C++, and is a Visual C++ architect for Microsoft.


Terms of Service | Privacy Statement | Copyright © 2024 UBM Tech, All rights reserved.