3 ms·
> a lot of substandard programmers use it That’s no longer the case. Substandard programmers have moved towards safer GC languages. > STL and Boost and other
by Const-me 8y ago
> a lot of substandard programmers use it
That’s no longer the case. Substandard programmers have moved towards safer GC languages.
> STL and Boost and other total and utter crap
For many parts, yes indeed, but both are optional. Boost is not even a standard library.
> typical C or C++ programmer simply will not write anything more efficient or more robust than the methods in these libraries if they decide to roll their own.
Some parts of the STL are just horrible. Look at <iostream> header. Even with my experience, I will struggle trying to roll my own IO that’s less efficient or less robust, I don’t think it’s humanly possible.
Other parts work OK but just too slow. For example, I avoid using standard collections except strings and vectors: https://github.com/Const-me/CollectionMicrobench https://github.com/Const-me/CollectionMicrobench
> to limit yourself to all the things that are basically available in C.
C++ has a problem, it doesn’t have an ABI. When you’re writing complex enough systems with it, you either invent one on top of it (see how MS did it in Windows with COM, IUnknown + HRESULT, used in DirectX, Media Foundation, .NET, UWP, and many other libraries & frameworks), or indeed limit yourself to things available in C, plus just a couple extra like unique_ptr, string and vector.
However, on the lower level, in the implementation of these components, C++ helps a lot. If you’ll look at how MS implemented C runtime library routines like printf(), you’ll find they have used a lot of C++ inside, even templates to avoid code duplication caused by char/wchar_t versions.