Friday, April 11, 2014

Problem statement: C++ auto objects

The main C++ problem is the copy semantics for stack objects. As a result, the complexity of OOP objects is multiplied by solutions to the overhead imposed by copy semantics. A look into the STL, or Qt, will show the detach and swap operations that are elements of heap based solutions to the heap or stack object allocation problem.

Multiplying the complexity of programs written in the language is obviously undesirable.

Also obvious is the compatibility between C and C++ which is maintained by this property of C++: a C++ compiler can compile C code with complete fidelity.

There exist solutions to this problem which break this fidelity with the C programming language, and solutions that do not.

However, this is not the only fundamental problem in the C++ programming languages.