Dr. Dobb's is part of the Informa Tech Division of Informa PLC

This site is operated by a business or businesses owned by Informa PLC and all copyright resides with them. Informa PLC's registered office is 5 Howick Place, London SW1P 1WG. Registered in England and Wales. Number 8860726.


Channels ▼
RSS

Editor's Forum


September 2001/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 [email protected], with “CUJ 20” as subject. Each reader whose photo or message is published will receive a CUJ 20th anniversary t-shirt.


Related Reading


More Insights






Currently we allow the following HTML tags in comments:

Single tags

These tags can be used alone and don't need an ending tag.

<br> Defines a single line break

<hr> Defines a horizontal line

Matching tags

These require an ending tag - e.g. <i>italic text</i>

<a> Defines an anchor

<b> Defines bold text

<big> Defines big text

<blockquote> Defines a long quotation

<caption> Defines a table caption

<cite> Defines a citation

<code> Defines computer code text

<em> Defines emphasized text

<fieldset> Defines a border around elements in a form

<h1> This is heading 1

<h2> This is heading 2

<h3> This is heading 3

<h4> This is heading 4

<h5> This is heading 5

<h6> This is heading 6

<i> Defines italic text

<p> Defines a paragraph

<pre> Defines preformatted text

<q> Defines a short quotation

<samp> Defines sample computer code text

<small> Defines small text

<span> Defines a section in a document

<s> Defines strikethrough text

<strike> Defines strikethrough text

<strong> Defines strong text

<sub> Defines subscripted text

<sup> Defines superscripted text

<u> Defines underlined text

Dr. Dobb's encourages readers to engage in spirited, healthy debate, including taking us to task. However, Dr. Dobb's moderates all comments posted to our site, and reserves the right to modify or remove any content that it determines to be derogatory, offensive, inflammatory, vulgar, irrelevant/off-topic, racist or obvious marketing or spam. Dr. Dobb's further reserves the right to disable the profile of any commenter participating in said activities.

 
Disqus Tips To upload an avatar photo, first complete your Disqus profile. | View the list of supported HTML tags you can use to style comments. | Please read our commenting policy.