Comment by mathw
9 years ago
But why? It doesn't really explain the purpose of this. What is it about Modern C++ that the author doesn't like? It could easily be read as a person who decided that C++ has too many things which are new and different and they couldn't be bothered to learn them properly so now has to tell everyone not to use them.
Most of this is really about specifics of your situation. Yes, pay attention to what's supported by compilers on the platforms you need to support. Yes, pay attention to memory usage and performance characteristics of the STL (but that's just part of being a good engineer, and the performance behaviour of STL constructs is part of the spec so it's not exactly hard to find out). Yes, use your own data structures where they fit your use case better than the STL ones.
But that doesn't mean, in general, that you shouldn't be using vectors. You just need to be aware what it's doing, and use intelligence and data to profile things properly when you're assessing whether the performance and memory usage of your code is acceptable.
Really, this feels more like specific guidance for a specific project that has specific requirements from its target platforms.
Except the bit about staying comprehensible to C programmers. C wasn't some mystical nadir in language design, and C programmers have brains. If they want to use C++ they can sit down and actually learn it, radical though that idea might be.
> If they want to use C++ they can sit down and actually learn it, radical though that idea might be.
I was always radical since the 90's, the C vs C++ discussions we have nowadays, I used to have them on USENET.
Even before C++98, the language already provided a sanity path to get rid of many of the typical C exploits and programmer errors, but those guys will never leave C.
Which with the success of free UNIX clones like *BSD and GNU/Linux, means we will never get rid of it until there is a radical change in computer architectures.