"C++ Sucks" - Why?

Pages: 1... 345
closed account (z05DSL3A)
"There are only two kinds of programming languages: those people always bitch about and those nobody uses." -- Bjarne Stroustrup
closed account (N36fSL3A)
I didn't mean to start a flame war... I'm just going to step away from this topic for a bit until you guys cool down. I don't want to get anyone more angrier...
@Grey Wolf, sorry, you're too late. Cubbi already posted that a while ago. I think this quote should only be allowed once per thread...

@Fredbill, who's flaming?
closed account (z05DSL3A)
It's never too late or too often for that to be said. :0)

I also haven't been following this thread, just keep seeing it floating to the top.
closed account (N36fSL3A)
I ment an argument.
At least now I know I can bug rapidcoder for help when it comes to my learning Java ;).
"There are only two kinds of programming languages: those people always bitch about and those nobody uses." -- Bjarne Stroustrup

This is so obvious and so useless then I have a hard time thinking about what you guys find so exciting about this quote. Is Bjarne really suggesting we shouldn't ever discuss anything?
closed account (z05DSL3A)
Is Bjarne really suggesting we shouldn't ever discuss anything?
To me it just means all programming languages have their flaws that people are going to bitch about. If no one is bitching about language X then it is because no one is using it and not because it is a good language.

So to answer "C++ Sucks" - Why?, all languages suck in some regard.
Absolutely, nothing is perfect. But this is not a response I would like to see if someone raises a valid argument against something.
Both the popularity of C++ and its complexity and other supposed flaws are the direct result of its goals, which it achieved and over-achieved despite zero budget and many competing interests. It could have been much simpler, but nobody would use it (see D).
@Cubbi, I don't think the comparison with D is fair. Do you not feel that Java is simpler than C++ (and plenty popular)? Also, could you list the goals of C++.
I don't think comparison with Java makes any sense, to be honest. Java is just too fundamentally different (despite the occasional attempts to stretch it into C++'s domain -- it fails miserably in practice)

C++'s goals evolved slightly over time. It started as a combination of three things:
1. Simula-style OOP (note, not Smalltalk-style like in Java)
2. Stepanov's generic programming
3. A better (safer, faster, and more managable) C
Today it is the lightweight abstraction programming language for software infrastructure and resource-constrained applications. Its key strengths are integrated resource management and error handling and extensive strong static typing.
Last edited on
I wouldn't call C++ lightweight. C++ programs, maybe, but not the language itself.
Last edited on
"lightweight" is the qualifier to "abstraction" in that sentence. C++ abstractions don't add overhead (and often remove it, as in case of functors/lambdas)
Java is Simula flavored. It would be almost unrecognizable to C++ programmers if it was Smalltalk flavored, which would have been against its design goals.
C++ abstractions don't add overhead (and often remove it, as in case of functors/lambdas)


This is interesting - are lambdas passed from a different compilation unit, inlined? If not, then I wouldn't call it no-overhead.
Some C++ abstractions add overhead: think about templates. The compiler has to generate the same code for every type (or set of types in the case of templates with multiple type parameters) that the template is used for, and that's only in a single source file. If the compiler doesn't optimise it away, the exact same function could appear in each file, leading to a larger executable, which could decrease performance.
Topic archived. No new replies allowed.
Pages: 1... 345