Departments


Editor's Forum


I've received phone calls over the past month or so from several of the leading authors of textbooks on C++ programming. First it was Herb Schildt, then Scott Meyers, and finally Al Stevens. Each of them asked the same two questions:

"When is the draft C++ Standard going to settle down, so we can write about it and not become instantly obsolete?"

"What do we do in the interim to describe a language that's still changing underfoot?"

I suppose I should be flattered that all these bright guys saw fit to call me up and ask such important questions. On the other hand, I didn't have any good answers for any of them, for either question. And I don't have such a great track record myself in this area. After all, I'm the guy who tried to write the definitive description of the draft Standard C++ library — just before it trebled in size. But then maybe that's why they called me. Who cares more about fire prevention than a person with second-degree burns?

I write these words within hours of boarding a plane to London. Besides going to the theatre as often as possible, I'm going there to attend the July meeting of WG21/J16, the committees standardizing C++. This is nominally the penultimate meeting for making changes before the draft is really, really, honest to goodness, frozen and sent up the line for final approval within ISO. There are nevertheless quite a few issues whose resolution can alter how even the most commonplace C++ programs should look. That prospect has to give any conscientious writer pause. How useful is an introductory text if the example on page 1 no longer compiles properly?

You can do a lot with conditional preprocessor directives, when writing practical C++ code. And you have to. Compilers are just coming on stream that purport to implement the full language, and these differ in esoteric but important areas. Even language experts can differ in how they interpret untried features. Matters are even worse with compilers in the field. No two commercial compilers that I work with come close to having the same profile of features implemented.

It's harder to write the moral equivalent of #ifdef in a tutorial example, however. You find yourself playing Wizard of Oz — pay no attention to those funny lines of code over there. Just look at what I tell you to look at. It doesn't wash.

A whole bunch of us writers have a stack of books we're eager to get on the market. So volatile is the book trade that you can't afford to wait too long for things to settle down. You really want to be on the store shelves when the interest first peaks. So each of us will have to find our own way to hedge our bets, to distract attention away from that man behind the curtain.

The good news is that C++ programmers seem to have a relatively large tolerance for uncertainty, of necessity I suppose. I seldom hear anybody complain about all the stuff that's outdated in C++ books written two years ago. You can be sure those three guys who called me will write good books. I just hope you readers will cut them some slack.


P.J. Plauger
pjp@plauger.com
http://www.tiac.net/users/pjp
http://www.dinkumware.com