Editor's Forum


This Sentence Is False

A child can appreciate the predicament the statement above presents. With four simple words, the mind is swept into the wondrous realms of the unprovable. I am reluctant to admit that I didn’t encounter those wonders until I took my first course in the Theory of Computation at the University of Arizona, under the expert tutelage of Dr. Peter Downey. (Please don’t ask how long ago that was.) Having previously spent years as a student of mathematics proving theorems, I found the idea of undecidable propositions both intriguing and unsettling. How could this be? Can we not design logical systems that are totally consistent? In a word, no. According to Gödel’s Incompleteness Theorem, any “sufficiently rich” system (beyond the complexity of the integers under addition and subtraction, say) will give rise to statements that cannot be proven. Think about it. The mathematical systems that guide our satellites, engineer our society’s infrastructure, and govern the development of the innards of the computer you spend so many hours in front of also have potentially frightening inconsistencies — black holes, if you will. I see two perspectives on this situation: 1) proceed with caution, lest you create a monster, or 2) throw caution to the wind and partake, while side-stepping those surprising singularities as you encounter them (if you’re lucky). I find myself in between the two extremes most of the time. Ah, the joy of life’s complexities!

C++ is a rich logical system. It has many known dark boundaries (labeled “undefined” or “indeterminate” by the C++ Standard), and many unknown ones I’m sure. Yet it is also sufficiently rich that we are still discovering many new and interesting ways to use it. This fact stands as proof of the soundness of its fundamental design. While you and I may find ourselves longing for but not quite grasping that sense of total mastery over C++ that is so much easier to attain with some other languages, in it we have tools that enrich our experience as problem solvers. Dr. Iverson, inventor of APL, often stressed that language is a tool of thought. The richer the language, the richer the thinking.

Now, please don’t get me wrong. I’m a lover of the power of simplicity. But I also appreciate Einstein’s great statement that solutions should be “as simple as possible but no simpler.” This maxim guides me as I patiently strive to grow in my mastery of C++. If you think about it, the basic constructs of C++ are simple: the syntax and semantics inherited from C coupled with member functions, operator overloading, templates, exceptions, RTTI, and namespaces — and you don’t have to use anything you don’t need.

Among the many practical solutions in this month’s issue, I especially appreciate and recommend Herb Sutter’s counsel on virtual functions and class interface design. The idiom of a non-virtual interface with supporting, non-public virtual functions is not new and is found in the iostream library, but Herb’s explanation is the clearest I’ve ever read. I also found Matt Austern’s extending of the iostream library with function objects quite enlightening.

No one knows everything about C++. (That sentence is true!) What I know makes me useful, and the fact that there is more to discover makes the journey rewarding.

Chuck Allison
Senior Editor

Publisher’s note: CUJ is celebrating its 20th anniversary and we want you to be part of it! In our November 2001 issue, we’ll publish a photograph of our most faithful subscriber with his/her earliest issue of CUJ (or C Users Group Newsletter). If that could be you, see page 48 for details. We’ll also publish anniversary thoughts from readers — if you want to contribute, email cujeditor@cmp.com, with “CUJ 20” as subject. Each reader whose photo or message is published will receive a CUJ 20th anniversary t-shirt.