I don’t so much hate C++ (the coolest name in programming languages, in my opinion) as I am confused by it. The creator of the language, Bjarne Stroustrup (the most awesome name in computer science, for my money), has stated that he wanted the language to build an all-purpose language, one that let you write device drivers and also let you write user friendly general purpose applications. Whether or not that is a good idea is a discussion for another day, but there already existed a language like that: C. It really seems that C++ exists entirely to bolt on an object oriented paradigm onto an already existing language. Now, of course, they took the opportunity to make other changes, but the core of that they did appears to be object oriented programming. But they didn’t add garbage collection. They left it to programmers to continue to manage memory on their own.
Memory management is one of the more difficult tasks for a programmer. It is relatively easy to mismanage the memory and end up with programs that swallow the available memory of the computer, causing crashes and other problems. In addition, bad memory management can produce bugs, like buffer overflows, that can create significant security problems. You now have a language that was supposed to be used for both low level tasks and mainstream programs that requires a significant level of effort on developer’s parts to maintain security and functionality. It seems like a high price to pay for a level of flexibility that doesn’t seem to really need to exist.
There are times when you need the power that memory management gives you. In those cases, you are almost always writing high performant, low level code. And C already does that well. So C++ doesn’t really seem to add anything in that area, and it makes writing the higher level programs it professes to be built for more difficult to write well.
Like I said, I don’t hate C++ any more than I hate any other programming language, but I am confused by why it was created the way it was. In trying to solve every problem, it doesn’t seem to solve any of them especially well.
Still has a cool name, though.