R
Rui Maciel
Tobias said:But as a C++ programmer I would never agree on using only the C subset of
C++.
The point I made with the reference to C++'s C subset was that:
- If C is considered good for memory management, then C++, as it includes a
subset of C, is also good for memory management when limited to that subset.
- If we add the remaining C++ features to C++'s C subset, the C++
programming language doesn't become worse for memory management. It
actually improves significantly, considering the addition of RAII.
Therefore, C++ is patently not worse than C with regards to memory
management.
The complexity of C++ makes it more difficult to agree on a common subset
of features, because the level of knowledge may vary more.
It isn't that complex as you make it out to be. I know of a company in the
telecom industry which explicitly banned the use of exceptions and the STL
in one of their C++ projects, the later in favour of a set of custom memory
pools. That policy was in the project's coding guidelines, and everyone who
was added to the project was briefed about what was kosher and what was
taboo. There was nothing difficult about that.
And it raises the possibility to make things even worse because you're not
understanding what you're reading.
You won't be reading idioms which were explicitly banned from a project.
Rui Maciel