Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!
  • Guest, before posting your code please take these rules into consideration:
    • It is required to use our BBCode feature to display your code. While within the editor click < / > or >_ and place your code within the BB Code prompt. This helps others with finding a solution by making it easier to read and easier to copy.
    • You can also use markdown to share your code. When using markdown your code will be automatically converted to BBCode. For help with markdown check out the markdown guide.
    • Don't share a wall of code. All we want is the problem area, the code related to your issue.


    To learn more about how to use our BBCode feature, please click here.

    Thank you, Code Forum.

C++ A Discussion Thread For The Hatred Of C++

Mathematical

Silver Coder
Hey there.

As I'm sure every programmer on the planet is aware of, C++ is a widely hated language. One so widely hated that even one of the inventors of UNIX, Ken Thompson, spoke out about it. This was one of two quotes:
Ken Thompson said:
I would try out the [C++] language [at AT&T] as it was being developed and make comments on it. It was part of the work atmosphere there. And you'd write something and then the next day it wouldn't work because the language changed. It was very unstable for a very long period of time. At some point, I said, no, no more. In an interview I said exactly that, that I didn't use it because it wouldn't stay still for two days in a row. When Stroustrup read the interview he came screaming into my room about how I was undermining him and what I said mattered and I said it was a bad language.

So, I've decided to create this thread for everyone to rant about C++. Criticize it all you want, but at the end of the day, it will always remain one of the most bloated programming-languages on Earth.

I would like to note however, that this thread is not intended for new C++ programmers to be deterred from learning it. C++ is a powerful and efficient language, if done right by a good programmer. It's only when either yourself or somebody else is bad at it, that will cause you to hate on it.

[UWSL]My Personal Opinion[/UWSL]
C++, in my own opinion, is a very scary language to me. I work with C, so I am able to transfer most of my knowledge of C, over to C++, since C++ descended from C. But, when you add in object-oriented programming, a confusing syntax, and a bunch of other unnecessary features into the mix, C++ turns into Frankenstein. I've seen the syntax of C++ and it's not pleasant on my eyes. I enjoy complexity, but not complexity that is extremely messy to work with.

Apparently, from what I've heard, C++ is also a lot slower than C. I have tested that before and if I do recall correctly, GCC compiled my C files faster than a C++ file - And that's only for the most basic of basic programs. I value speed when it comes to software and so C++ does not fit the bill for me. The only good thing though, is portability, which C++ successfully inherits from C.

As I said in the notice above, C++ can be extremely powerful and efficient if you write good code in it. But going back to the syntax, even good code can become messy and hard to read, especially in C++. Not even the syntax in a basic Hello World program in C++ makes sense to me. I mean, why can't I just use some kind of built-in print function, rather than having to write: std::cout << "..."?

As much as I'm interested in C++, I'm definitely sticking with C. I much prefer speed and portability over power and portability, which C is and C++ isn't. Going back to the purpose of this thread, I'd like to hear your criticisms of C++. I've made mine so it's time to hear yours.
 
The entire X language is better than Y language is utter misunderstanding and pure BS . Refrain from getting in such discussions . Because I saw some really confusing lines and misunderstanding , i cannot help myself answering those.

Alright .

Before you judge me for having a based answer towards C++ , I do use C (maybe more than C++) . This will sound biased towards C++ but again I will emphasisze that C++ is a bloated language with a lot of quirky undefined stuff .

So to counter your "Ken Thompson quote" , Here is what papa bjarne says : " "There are only two kinds of languages: the ones people complain about and the ones nobody uses" --- Bjarne Stroustrup "

The entire point of you posting the Ken Thompson relates back to the time when C++ was in a experimental stage , it really makes me laugh on how the legend Ken Thompson himself failed to foresee that it was still being developed and not to the point where its maturity can be overjoyed (And before someone comes up with that languages need to be extremely stable right when it is in early development then what about python ? rust ? They took several iterations to become highly stable . Python 2 code will likely throw errors if you run it in python 3 interpreter ) . That is a really old quote i don't see a point to bring it up in 2020 when C++ has majorly changed into a different language .


The whole C++ is a "hated" language comes majorly because of two things - "highly dense language complexity" which is why you can write it as a "bloated language" and I agree whole heartedly , and the next thing is the "undefined behavior" and again yes , it is a bit of a hassle and which is more or less the consequence of the former.


Criticize it all you want, but at the end of the day, it will always remain one of the most bloated programming-languages on Earth.

Uhm I am not sure what you mean by this , yes it is a bloated language but are you defending it or going against it ? , it is really confusing .

Anyways , the latter part of "speed" . Well yes C is somewhat faster (more speed ) i will say but then again you get what you need so i don't really see the problem there , here is the thread i am referring to speed . It might have been true back then but now , i don't think the entire C is faster than C++ discussion is of any value . Moreover , we are talking about compile time as i can infer so .

You can disable name mangling in C++ for C . And the arguement for cin and cout , well just desync the stream or use scanf / printf . You can totally use those . I fail to understand why it is a "scary" language . You mean it will somehow wriggle your mental capacity and make you forget everything ? No


C++ code is hard to understand ? Maybe . For me no , I have seen worse in C and if required i can show that (then again this is largely relative to what one is familiar with ) . Giving a opinion here is meaningless . One syntax might be *relatively* hard and as a person who likes to get into complex syntax i enjoy C++ .


Lastly ,
C++ is at this point is totally different language (well in someparts atleast) , in domain specific terms , there is yet to be a better language which is available (STL is useful , albeit bloated , i cannot imagine doing competitive programming without vectors ,multisets , a direct sort() function etc , yes C can do that but STL has it so the time factor is reduced)
. If speed is your soul criteria then sure go for C . In particular areas , using C becomes a nightmare (competitive programming , graphics engineering , research table evaluation , the simulation libraries etc) .


Edit: Forgot to mention this , but yes C++ descended from C but modern C++ is nothing like C . Good Luck with "transferring" your C knowledge . It is not confusing rather different .
 
Last edited:
Hey, @Ohaiiya.

To be fair, you make some really good arguments, not for C++, but C too. Anyway, welcome to CodeForum. Now, let's see...

The entire X language is better than Y language is utter misunderstanding and pure BS . Refrain from getting in such discussions . Because I saw some really confusing lines and misunderstanding , i cannot help myself answering those.
I do know that there is not one language to rule them all. Although, I technically didn't say that C was better than C++ or C++ was better than C. I simply just gave my opinion on why I'm turned off from C++ and why I'd stick with C.

Also, everyone gets in these kind of discussions - Especially when it comes to C++. And I also wouldn't call comparing X language with Y, bullshit. As long as you bring up valid arguments, then it won't be bullshit.

So to counter your "Ken Thompson quote" , Here is what papa bjarne says : " "There are only two kinds of languages: the ones people complain about and the ones nobody uses" --- Bjarne Stroustrup "

The entire point of you posting the Ken Thompson relates back to the time when C++ was in a experimental stage , it really makes me laugh on how the legend Ken Thompson himself failed to foresee that it was still being developed and not to the point where its maturity can be overjoyed
You make a fair point here. C++ was still being developed at the time, but even if C++ is stable today, it could become unstable tomorrow. If I'm correct, the past few iterations of C++(C++11, C++14, and C++17), have all been focused on adding lots of new features into the language. And as we both know, the more features, the higher chances of it being unstable, unless it's done right. Stroustrup's focus clearly isn't on a stable language if he's getting the standards committee to keep on adding new features. He's essentially creating a "Frankenstein-Language".

Also, there are many other famous computer-scientists and programmers out there, who also hate C++(The creator of Linux - Linus Torvalds - Is one that springs to mind). Even if C++ becomes a language that people will start to like more and more, there will still be people who hate it - Even if they give it another shot.

The whole C++ is a "hated" language comes majorly because of two things - "highly dense language complexity" which is why you can write it as a "bloated language" and I agree whole heartedly , and the next thing is the "undefined behavior" and again yes , it is a bit of a hassle and which is more or less the consequence of the former.
If Stroustrup had designed C++'s syntax to bare more resemblance to C, then perhaps the transition from C to C++ in codebases wouldn't be difficult to do and neither would programmers be turned off from learning C++ because it would have a familiar syntax. But no, Stroustrup had to build a complicated syntax, which is understandable considering the features that are a part of C++.

Uhm I am not sure what you mean by this , yes it is a bloated language but are you defending it or going against it ? , it is really confusing .
Sorry if I went a bit ambiguous at that part. What I was trying to say is that anybody can criticize C++ until the end of days. But no matter what they criticize, the language will just get more and more bloated, as C++ continues to add more features to try and appeal to all kinds of programmers.

But no, I wasn't trying to both defend and criticize C++ in that statement. It just happened to go ambiguous.

It might have been true back then but now , i don't think the entire C is faster than C++ discussion is of any value .Moreover , we are talking about compile time as i can infer so .
Well yeah, C is definitely more faster at compiling than C++. But when the program is running, there is of course, not really a difference - Unless the code is poorly written.

And the arguement for cin and cout , well just desync the stream or use scanf / printf .
If I had known this sooner, perhaps I wouldn't be so harsh on cin and cout. Whenever I go to try and learn C++, I always see tutorials using the former rather than the latter(printf() and scanf()).

C++ code is hard to understand ? Maybe . For me no , I have seen worse in C and if required i can show that
I am well aware that code written in C can be just as bad in terms of complexity as C++. The examples presented in The C Programming-Language(Both first and second edition), can also get pretty complicated. Not only can the code in that book get to unimaginable levels of complexity, features such as pointers(Which are available in both C and C++), can make code that was once understandable, turn into a living nightmare for some.

So yeah, C can be complicated sometimes as well. I'm also just like you, but instead of C++ code not being hard to understand, it's actually the opposite in that C code is not hard for me to understand.

Lastly ,
C++ is at this point is totally different language (well in someparts atleast) , in domain specific terms , there is yet to be a better language which is available (STL is useful , albeit bloated , i cannot imagine doing competitive programming without vectors ,multisets , a direct sort() function etc , yes C can do that but STL has it so the time factor is reduced)
. If speed is your soul criteria then sure go for C . In particular areas , using C becomes a nightmare (competitive programming , graphics engineering , research table evaluation , the simulation libraries etc) .
You do make another good point here. Yeah, C++ may be a totally different language, and C, along with C++, certainly do not get on well in certain areas. C++ does well in software and AI, will C does better in operating-systems and getting into the nitty-gritty of computers.

I've always been a speed over power person, so of course, I'll be sticking with C. Plus, it isn't getting bloated with so many features which I won't even every few years or so, which is another reason to stick to it.

Edit: Forgot to mention this , but yes C++ descended from C but modern C++ is nothing like C . Good Luck with "transferring" your C knowledge . It is not confusing rather different .
Regarding that statement about transferring your knowledge from C to C++, you technically still can, albeit for certain features. Variables, functions, headers, loops, and control-flow statements can all still be applied from C to C++. I'm going to assume the same with pointers and structures(Unless Stroustrup and his committee also drastically changed those).

As a side-note: I didn't just start this thread simply for the sake of getting a bunch of people to crap on C++ and then turn others away from it. No, I actually started it because the debate around C++'s hate, to me anyway, was actually quite fun and interesting. I like listening to people's opinions on things, so I started this thread. Plus, CF is still a small forum, so I wanted to give people something to talk about while the site continues to expand. Hope you can understand that.
 
(The like to the above comment is by me in case some new forumer takes stuff the opposite way ) .

As a side-note: I didn't just start this thread simply for the sake of getting a bunch of people to crap on C++ and then turn others away from it. No, I actually started it because the debate around C++'s hate, to me anyway, was actually quite fun and interesting. I like listening to people's opinions on things, so I started this thread. Plus, CF is still a small forum, so I wanted to give people something to talk about while the site continues to expand. Hope you can understand that.

Oh I see , If that is the case then it is completely fair point .
Anyways I will be a regular here from now i guess ^-^
 
Oh I see , If that is the case then it is completely fair point .
Anyways I will be a regular here from now i guess ^-^
I'm glad you could understand. If you have any other points and comparisons, feel free to make them. Or if you wanted to, you could start a debate about another language, or it could be any piece of technology. It doesn't always have to be a language. I do believe that debates are a great way to get the community involved and I'm glad that this one is going well so far(Even if you are the only one who has chimed in with an opinion).

And again, welcome to CF. If you'd like, you can go and introduce yourself down in the Hello World board; make a reply to another thread on any other board; or even start a thread of your own. Also, don't be afraid to contact the staff-team(Myself included), if you have any questions or issues. Welcome again.
 

New Threads

Latest posts

Buy us a coffee!

Back
Top Bottom