I've heard so much laid at C++ feet over the years, but I don't find it all that horrible to work with. It seems about on the same level as Python to get most things done, just without all the magic of the python standard library.
Are there some good stories of the bad of C++ that anyone can share?
My main gripe is the mental overhead when compared with other languages and the bulkiness of the syntax.
Languages that contain lists and maps as first class types and the syntax to go with it are so much nicer.
It's no joke that large C++ applications contain a poorly defined subset of common lisp.
The standard library is small. Things that are included out of the box in other languages do not. Doing some simple things are not as simple as in some other languages.
When dealing with math, on the other hand, as systems languages go, C++ is not the worst alternative. Getting numeric stuff correct is about as difficult in all languages.
I would not use C++ anything that benefits from prototyping. Otoh, when the spec has been defined and it is fairly obvious what needs done there is no reason why it should not be banged together using C++.
You forgot to explicitly specify the allocator in the vector...... - it'll default to std::allocator and put items on the heap but you could potentially use your own and get it to put stuff on disk instead!
I don't find your example that convoluted to read to be honest.
It's impressive to see how many of the complaints have been addressed by C++11, actually, and how many others have been addressed by compatible changes to the compilers and standard libraries (in particular, template related error messages can still be pretty bad, but they have improved tremendously with gcc and clang in the last few years).
Ah yes I forgot that. I remember Stroustrup explicitly stating that he avoided adding stuff like GUIs to the STL as people forget that C++ isn't just ran on desktops.
I use wxWidgets with a mix of STL (you can tell wxWidgets to use STL for its containers if you want) and all works well.
I had been happily using extra networking libraries and the ease of using libraries means I kind of forget that the STL doesn't have it - I just get into a habit of using the right library for the job, which is the way it should be I suppose.
Are there some good stories of the bad of C++ that anyone can share?