The C++ Reference of the Day
Saeed Amrollahi Boyouki
Software Engineer, C++ Expert, only IRANIAN member of C++ standardization committee. I was an instructor at Sharif Univ. of Tech.
How often have you been asked the variants of such a question: why doesn’t C++ have such a feature? Something like: Why doesn’t C++ automatically initialize -uninitialized- local variables of numeric types to zero? Why doesn’t C++ check the array or vector bounds? Why doesn’t C++ have a garbage collection? Why a class member functions aren’t virtual by default?
My answer: Countless times!
In this article, I would like to introduce a paper that answers such questions:
Andrew Koenig and Barbara Moo. Why Programming Languages Can't Be Perfect. C/C++ Users Journal, August 2005.
The paper was written by Andrew Koenig and his spouse Barbara Moo. Andrew Koenig was one of the most influential in C++ in general and the 1998 standard -C++98- achievement in particular, but he is mostly retired from C++ now.
From the paper's conclusion:
… Every programming language has its quirks, and those quirks are usually there for a reason. Understanding the reasons for those quirks can often show us how to use the language more effectively. Often the answers to such questions are that the language's designers chose a compromise between several conflicting goals. In the case of C++, those goals usually include performance and compatibility, both with C and with past C++ usage. Compatibility issues often turn out to be important for much longer than it might seem at first …
You can download the paper from the following link:
Enjoy!