Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Why is C++...

Name: Anonymous 2011-12-07 12:06

...so bad? Why does it have such a bad reputation?

I'm an experienced C++ programmer and, while the language has warts, I can't understand the reason for the enormous amount of criticism against the language.

I'd like to hear the honest opinions of /prog/rammers in this regard.

Name: Anonymous 2011-12-07 12:09

C++ isn't as minimalistic, uniform and elegant as Lisp.

Name: Anonymous 2011-12-07 12:14

>>1
Why is C++ so bad? Why does it have such a bad reputation?
You are asking wrong questions. The second one is better, but still not quite there.

The correct question is, "Why does C++ have such a bad reputation in /prog/ and /r/programming?" Asking the right question is half the right answer, isn't it?

Name: Anonymous 2011-12-07 12:17

>>3

I appreciate your remark, but I suppose that the intent of the thread is still clear.

Name: Anonymous 2011-12-07 12:27

The most vexing parse?

Seriously, C++ has a weird design. No matter how good you code, it will always seems broken.

Name: Anonymous 2011-12-07 12:32

>>5

Why does it have a weird design? I would suggest that most problems in this regard, which are applied exclusively to C++, are problems in the OO-paradigm itself.

Name: Anonymous 2011-12-07 12:32

>>2
TOO BAD LISP IS SLOW AS BALLS

Name: Anonymous 2011-12-07 12:33

It's badly designed.

See also http://yosefk.com/c++fqa/

Name: Anonymous 2011-12-07 12:38

just look at "the c programming language" book and "the c++ programming language" book. one is rather concise, the other goes on and on forever with millions of keywords, rules and exceptions to rules that you will never fully understand. it's madness.

Name: Anonymous 2011-12-07 12:47

>>8
I know this site. I've read it a number of times in its entirety. I agree with roughly half of the criticism Yossi proposes. He exaggerates the matter.

>>9
I agree with the fact that C++ is well complicated in comparison with C (and most other languages). But I don't think this is specially bad, nor exclusive to C++: many languages have a lot of complex concepts which aren't always easy to grasp, nor easy to express. In my opinion, C++ was intended to hoard a lot of different techniques and "programming paradigms" (I hate that expression). This will naturally yield a gigantic language, both in syntax and in concepts.

Name: Anonymous 2011-12-07 12:53

<3 C++ - it's relatively easy to get, and you get used to the quirks after years and years of programming

Name: Anonymous 2011-12-07 12:54

>>9
the other goes on and on forever with millions of keywords, rules and exceptions to rules that you will never fully understand. it's madness.
Not me, you!
WOW SON, U BUTT ANGREY
gb2 pussybaby land where u git own3d by dick
"omg im so dumb i cant understand c++" -You
SUMBUDY IS ANALLY ANGUISHED

Name: Anonymous 2011-12-07 12:58

^ lol

Name: Anonymous 2011-12-07 12:59

C++ is better than all the GC languages combined. Sometimes it's even better than C.

GC is shit.

Name: Anonymous 2011-12-07 14:12

>>14
allocation is expensive
memleaks are shit

Name: Anonymous 2011-12-07 14:42

>>10
``Programming languages should be designed not by piling feature on top of feature, but by removing the weaknesses and restrictions that make additional features appear necessary.''
- Wizard

Name: Anonymous 2011-12-07 15:00

>>15

Memleaks are shit

Maybe you should clean them up then, yes? Like so:
delete MyShittyPointer;

Name: Anonymous 2011-12-07 15:00

“If you think it's simple, then you have misunderstood the problem.” -- Bjarne Stroustrup when designing C++

>>6
I don't think so. Exceptions, (lack of) runtime type system, superb chain of template headers, duplicated template instantiations in object files, (possibly infinite) obscure rules for implicit casts, lack of a better preprocessor, awful parseable grammar... I mean, just try to debug some template errors and you've got work for a week.

I'll never learn C++ entirely, and don't care!

“I have always wished for my computer to be as easy to use as my telephone; my wish has come true because I can no longer figure out how to use my telephone.” -- Bjarne Stroustrup

Name: Anonymous 2011-12-07 15:00

C++ is constipated shit.

Name: Anonymous 2011-12-07 15:03

>>15
How about allocating most of your shit from the stack, ``faggot" ??

Name: Anonymous 2011-12-07 15:10

>>17
What can I do if myShittyPointer are deep inside the library I'm going to use? Rewrite everything from scratch?

Name: Anonymous 2011-12-07 15:19

>>20
''IHBT''!

Name: Anonymous 2011-12-07 15:20

>>20
Implying that shared data must be global static variables.

Name: Anonymous 2011-12-07 16:24

>>18
Despite the problems regarding exception specifications, unexpected() and such, exceptions in C++ are rather ok in my opinion. I have never had problems with them, and I think they're particularly well design for their purpose. The feasibility of exception handling, on the other hand, is another matter, and is not restricted to C++ in any way.

About the type system, C++ offers typeid and dynamic_cast when it is necessary, but I agree the language should offer some means of providing some reflection, even compile-time reflection would be very useful (that is, automatically create code from the structure of a known class). The header chains and preprocessor issues are really the compilation bottleneck in any C++ program, and it is derived from C; however, this problem is greatly alleviated by precompiled headers (which, I agree, are a terrible solution for the problem, but they work nonetheless).

Duplicated template instantiations are not much of a problem in modern compilers with template repository control. And I sincerely don't see much obscurity in the implicit type conversion rules -- there are a few cases, and one quickly grasps them once he becomes familiar with the language.

The major problem with C++, in my opinion, is the toolchain. Many problems you've cited would be much better handled if the compiler did it's job a little better, specially when issuing error messages to the user. The fact that C++ inherits many things from C serves it for good and for bad: the limitations of the C toolchain (over which most C++ compilers are written) cannot cope with the complexity of C++, but I disagree that a language should be written towards compatibility with the toolchain. Compilers could produce a lot of information besides mere object files which would help them to locate symbols, handle template instantiations and much more.

Name: Anonymous 2011-12-07 16:46

>>24
Language should offer uniform syntax, and the only way it can do so is by being Lisp. Else language is a crap.

Name: Anonymous 2011-12-07 16:48

>>25
Uniform syntax is unreadable shit. Fuck off and die.

Name: Anonymous 2011-12-07 16:52

>>26
No.

Name: Anonymous 2011-12-07 16:55

>>25
i can do this with C Macros

Name: Anonymous 2011-12-07 16:56

>>25
Why? Sounds just like hivemind mentality.

Name: Anonymous 2011-12-07 16:59

>>28
No.

>>29
No.

Name: Anonymous 2011-12-07 17:08

>>27,30
Go back to whatever lithp shithole you came from, and take your shitty unreadable cdr-ridden language with you.

Name: Anonymous 2011-12-07 17:19

>>31
No.

Name: Anonymous 2011-12-07 17:24

>>32
You're shit.

Name: Anonymous 2011-12-07 17:25

>>33
No.

Name: Anonymous 2011-12-07 17:27

>>34
Fuck off and die already.

Name: Anonymous 2011-12-07 17:28

>>34
plz go away `fgt'

Name: Anonymous 2011-12-07 17:30

>>35>>36
No.

Name: Anonymous 2011-12-07 17:32

>>33,35,36
Why?

Name: Anonymous 2011-12-07 19:46

>>25-38

same poster

Name: Anonymous 2011-12-07 21:17

>>16

Profound-sounding statement meaning almost nothing in practice.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List