On various occasions, I think about C++.
I devoted a few years of my life developing a 3d engine in C++. I learned the language from Stroustrup's book ("The C++ Programming Language"). I also developed a Qt-like widget framework using boost::signals
Also, many examples from "The Game Programming Gems" were using C++, and even some of the chapters in those series were devoted to some specific language features (such as template metaprogramming)
But only after I decided to embed #Guile #Scheme into my engine - which resulted in rewriting the whole thing in pure C - I got enough perspective to criticize the language
I have a strong feeling that the popularity of C++ stems from three factors:
- convincing a lot of people that "C++ is a better C, so if you're using C, you can as well use C++"
- lack of critical thinking among most programmers
- the love of complexity among (usually inexperienced and naively enthusiastic) programmers
I started learning C++ around 2003 (so that was ISO/C++98), but - using macros and a GCC extension - I came up with my own range-based for loop:
#define for_every(ITERATOR, COLLECTION) \
for(typeof(COLLECTION.begin()) ITERATOR = COLLECTION.begin(); \
ITERATOR != COLLECTION.end(); \
++ITERATOR)
I don't love the C programming language, but one thing it is fairly good at is modeling what the computer is going to do, and how the system is going to be organized (especially if you work with it at the level of object files)
C++ makes this so much harder, with all of its templates, overloading and name mangling. And its design methodology really is reminescent of a kid in a toy store pointing fingers at different toys and saying, "I want this! and that! oh this is so cool can I have it as well?"
There seems to be very little thought, and design thinking, in C++, on a very fundamental level. (And I liked how the recent drama-blog post pointed out Stroustrup's lack of experience)
But the worst thing, let me tell you, the worst thing, are all those proponents of C++ that you meet on the Internet, who have very little to no experience with anything else, and even their experience with C++ is somewhat miniscule (so that they don't even know about the existence of weird entities such as "r-value references"), and they appear every now and then to tell you how wrong you are in your criticism of C++, because it's the best single language ever invented, but somehow they are never able to refute your arguments
I met dozens of them