Why is C++ a half-assed piece of crap?
Hmm let me see. First off, I have to say C++ is the language I've programmed the most, and I know it by heart, bit by bit. I still prefer C, definitely, or Java, or Smalltalk (if it wasn't for the lack of support), or Objective C+cocoa.
I still HAVE to use it because it's a standard and sell better than any other.
If I run a project myself I go C and maybe ASM if performance is critical. Sometimes Perl, PHP or Java, it depends.
Most of C++'s problems come from it's preprocessor nature. If you want an OO C try Objective C. C++ is a flimsy static patch. Fails at almost everything:
C++ is slow as a compiler (it's merely a preprocessor so it's not surprising, but OK no big deal)
C++ lacks compatibility. To make really portable code it's a real pain in the ass.
Debugging sucks. Most of the error messages (in ANY compiler, it's a matter of language structure) are quite cryptic and you have to guess yourself.
When you're dealing with hardware or complicated structures, you usually
NEED to know how the preprocessor itself works (or try a different way). If I have to preprocess in my head to C anyway, I prefer coding C in the first place. Thus the learning curve is endless. You have to deal more with it's intricacies than with the real problem and algorithms.
You program great code in C in just one year if you're dedicated. You program great code in C++ after 5~6 years (as great as it gets) and you don't do anything else or better (OK, support and libraries...)
Seriously, if I have to choose, I prefer C or C-like C++ (when I need some C++ library or port) and ASM chunks if I need performance-critical code. If you need to program seriously in C++ anyway and not just for Winbloze, go C++ paired with QT.
Remember C++ is not M$-Visual C++
C++ is not REAL OO. I can
THINK OO and program C anyway far better, effectively and quickly and I have less experience.
--> I still have to know of an expert, intelligent programmer who cares about portability and/or performance and still prefers C++ to anything else.
--> I still have to see C++ code from a big project for several platforms not needing thousands of hacks to work properly. If you have seen one please show me.
Try programming an OS in C++. Java is good at some things. C++ is just premature and outdated for what it tries to be. C# looks better but I just hate too much M$.
----------------
Selecting a programming language made easy:
http://theparticle.com/fun/fun.php?topi ... ng&id=2337
(where's C++?
)