Editor's Forum

C/C++ Users Journal December, 2005


I'm writing this installment at the WG21 C++ meeting in Quebec. Today, Tana and I drive home after five weeks of travel that has taken us through five countries on three continents. Having slept in ten different beds since Labor Day, I'm eager to get home—and back to work. Fool that I was, I assumed I'd be able to get a few chores done in those odd moments that always crop up when you're on the road, even on vacation. Perhaps a younger me might have done so, but not this year's model. I also assumed that Internet connectivity is always available, in some form, wherever you go these days. That's true enough if you stretch the definition thin enough, but a 50-Kbps link or one that costs a buck a minute just isn't as productive as the flat-rate DSL back home. The bottom line is, I had all I could do to keep up with the usual sales and support queries. Whenever I had a spare moment, and adequate bandwidth, I found myself web surfing in that aimless way we accuse This Younger Generation of indulging. Older ain't always better.

The C and C++ Standards meetings were held across the lake from Mt. Tremblant, a ski area I frequented in my middle youth. The Tremblant area has built up quite a lot in recent years, but it still doesn't offer much more out-of-meeting activity than Lillehammer, Norway, where we held our Spring 2005 meetings. This is definitely the year of the off-season ski resort, a novelty that is beginning to pall among the more citified of us Standards hacks. Next year's meetings will be in Berlin and Portland, Oregon. Hurrah, hurrah. But we did get lots of work done. The C committee spent a good slug of time refining the "Secure C" Technical Report that I've described in the past. The name now gets quotes because it has changed to something a bit less controversial. Since security means many different things to different people, we thought it better to focus on the bounds-checking aspect. I forget the exact name, but that term is in there somewhere. More important, the TR is getting done, and it still closely resembles the enhanced C library that Microsoft is shipping with Whidbey (which may even be formally released by the time you read these words). It's always nice to codify existing practice, even if the ink is still drying on it. The C committee also did its usual drudge work, processing Defect Reports and that sort of thing. So too did the C++ committee the week following, at least in the library and core language subcommittees. The next release of the C++ Standard will include long long integers, just like in C99, as well as all the new stuff in the C99 preprocessor. The sexy C++ additions are processed in the evolution working group, headed by Bjarne Stroustrup. (And yes, they've already heard all the jokes about intelligent design.) Perhaps the biggest addition in the pipeline is the notion of "concepts." Put simply, these are constraints you apply to templates to clarify which one you want instantiated, or not, depending on the properties of the template parameters. What we have today is a thing called "template metaprogramming" (a.k.a. stupid template tricks), a surprising capability that emerged from the original rules for template selection. You can get the compiler to make decisions largely undreamed of in the original template design, but at a cost. The cost is incredibly tricky code and obscure diagnostics when things go wrong. Concepts are, if you will, a way of expressing template metaprogramming selections in clearer language, with clearer diagnostics. The details are still being hammered (and haggled) out, but there's already a trial implementation atop GCC, and a lot of hope for success. One thing that didn't happen in either the C or C++ committees was any additional work on the decimal floating-point proposal that I've described previously. Seems the IEEE committee responsible for specifying the format and properties of these new data types got bogged down for a spell. I hear indications that they are getting unbogged, but neither C nor C++ could make progress in the meantime. Oh yes, the ECMA committee TC39/TG5 also finished up its work on C++/CLI, the dialect Microsoft developed to facilitate .NET programming from C++. Tana and I missed the last meeting; we were watching lions and elephants in South Africa instead. But somehow the committee soldiered on without us. It's yet another thing coming out with Whidbey. Maybe I'll stay home long enough to play with it a bit.

P.J. Plauger
Senior Contributing Editor
pjp@plauger.com