Allegro.cc - Online Community

Allegro.cc Forums » Off-Topic Ordeals » Why C++ sucks: Not Flame Bait

This thread is locked; no one can reply to it. rss feed Print
 1   2   3 
Why C++ sucks: Not Flame Bait
nonnus29
Member #2,606
August 2002
avatar

Linus Torvalds says it:

Quote:

On Wed, 5 Sep 2007, Dmitry Kakurin wrote:
>
> When I first looked at Git source code two things struck me as odd:
> 1. Pure C as opposed to C++. No idea why. Please don't talk about portability,
> it's BS.

YOU are full of bullshit.

C++ is a horrible language. It's made more horrible by the fact that a lot
of substandard programmers use it, to the point where it's much much
easier to generate total and utter crap with it. Quite frankly, even if
the choice of C were to do nothing but keep the C++ programmers out,
that in itself would be a huge reason to use C.

So, a benefit of C is to discourage C++ programmers from contributing. The exchange continues for awhile, I don't think the Dmitry guy knows who he's talking to. It's pure comedy.

And then Walter Bright steps in and starts talking about D. Linus declines to comment on D; maybe some political reasons behind his silence? Your guess is as good as mine..... :-/

Dustin Dettmer
Member #3,935
October 2003
avatar

Quote:

Quite frankly, even if
the choice of C were to do nothing but keep the C++ programmers out ...

Couldn't this same feat be achieved by filtering patches?

[code Linus]
- inefficient abstracted programming models where two years down the road
you notice that some abstraction wasn't very efficient, but now all
your code depends on all the nice object models around it, and you
cannot fix it without rewriting your app.
</code>
This is very true of all languages, but especially C++. A good C++ programmer will understand this concept and do their best to solve it as they go.

I like the way he worded this.

Thomas Fjellstrom
Member #476
June 2000
avatar

Linus just likes to shoot his mouth off :) Hes rather blunt and unadulterated.

--
Thomas Fjellstrom - [website] - [email] - [Allegro Wiki] - [Allegro TODO]
"If you can't think of a better solution, don't try to make a better solution." -- weapon_S
"The less evidence we have for what we believe is certain, the more violently we defend beliefs against those who don't agree" -- https://twitter.com/neiltyson/status/592870205409353730

Matthew Leverton
Supreme Loser
January 1999
avatar

Linus also said about Linux: "I'm doing a (free) operating system (just a hobby, won't be big and professional like gnu) for 386(486) AT clones." What he says is irrelevant. Being the founder of Linux doesn't automatically make you a genius at anything.

Dustin Dettmer
Member #3,935
October 2003
avatar

Quote:

Being the founder of Linux doesn't automatically make you a genius at anything.

And yet everyone gets the inherit feeling it does. I wonder what causes emotions of this kind in people.

Matthew Leverton
Supreme Loser
January 1999
avatar

Quote:

Linus declines to comment on D; maybe some political reasons behind his silence? Your guess is as good as mine...

I would guess that he is simply much more comfortable with C and basically feels threatened if anything were ever to go to C++ (or another language) because it would be a sign that his power as the Supreme Nerd is waning. (Okay, so I'm not really serious.) All he can do is shoot down C++ by saying that C++ programmers are bad, and so they should use C to prevent bad programmers from contributing code. That is an incredibly pathetic excuse, yet he thinks it's a great reason.

I think it just shows that he really had no interest in defending C, but just wanted to flame a guy and an entire group of programmers (C++) to make himself feel better about himself. That's a sort of mental disorder that he could get medicine to treat.

I do agree that C++ is a bad language, but he should have either given real reasons or just not said anything. Later on he says something I agree with (minus the dramatic "absolute worst") and think is better said:

Quote:

And if you want a fancier language, C++ is absolutely the worst one to
choose. If you want real high-level, pick one that has true high-level
features like garbage collection or a good system integration, rather than
something that lacks both the sparseness and straightforwardness of C,
and doesn't even have the high-level bindings to important concepts.

Kibiz0r
Member #6,203
September 2005
avatar

Honestly, I'm feeling the same way about C++. I'm about ready to pack up and move to C# or Java. Maybe Python, that seems to be popular in the indie scene, even among the more professional ones.

Matthew Leverton
Supreme Loser
January 1999
avatar

Archon
Member #4,195
January 2004
avatar

I'm a substandard programmer? :'(

I wouldn't mind a C# that compiles to machine code and that can also link to C/C++ libraries.

Quote:

Use D! 8-)

For me, the choice of language also depends mostly on the IDE. There are no nice and working D IDEs that I know of (I tried Code::Blocks a while ago, but.. eugh)

bamccaig
Member #7,536
July 2006
avatar

I still enjoy C/C++, but C# and D are also appealing. I think I'd like to give Java another try (hopefully I learn the right way this time), but I'm not holding my breath. IIRC, Python is [one of] the language[s] where whitespace is a language construct... :-/ No thanks.

kazzmir
Member #1,786
December 2001
avatar

alternate reality said:

And if you want a fancier language, C is absolutely the worst one to
choose. If you want real high-level, pick one that has true high-level
features like garbage collection or a good system integration, rather than
something that lacks both the sparseness and straightforwardness of assembly,
and doesn't even have the high-level bindings to important concepts.

It still sounds like rubbish to me. I agree C++ isn't a good high level language but you don't have to use all its esoteric features. If you only use it as a C with objects/polymorphism langauge then I would say that is far better than just plain C. Objects are useful 99% of the time and a language that supports them directly is infinitely better than one that doesn't.

Matthew Leverton
Supreme Loser
January 1999
avatar

Quote:

I wouldn't mind a C# that compiles to machine code and that can also link to C/C++ libraries.

That's D. ;) [Actually it cannot link to a C++ library directly, but hardly anything can.]

Quote:

If you only use it as a C with objects/polymorphism langauge then I would say that is far better than just plain C. Objects are useful 99% of the time and a language that supports them directly is infinitely better than one that doesn't.

Again, D does a much better job at "extending" C than C++ does.

Archon
Member #4,195
January 2004
avatar

Quote:

That's D. ;)

I edited my post above, but anyway: IDEs are important because it helps with the organisation of all the files and the classes.

If KDevelop supports D in the future, I'd likely use it (D).

Goalie Ca
Member #2,579
July 2002
avatar

Quote:

Linus declines to comment on D;

Probably because he doesn't know a thing about it. T3h interweb is funny sometimes, in allegro D is king and on digg ron paul is president.. not to mention that on reddit haskell is the way of the future.

I can see Linus point about C. From a systems point of view it's a really good language. Your mindframe and design patterns stay sane as well. It may be a pain to work with from time to time, but at others nothing else can be more elegant. Being a systems guy, i can really appreciate C. If you're really good at c then more power to you.

-------------
Bah weep granah weep nini bong!

Matthew Leverton
Supreme Loser
January 1999
avatar

D is great "on a.cc" because most of what we do (when making video games) has no need to interface with a huge standard library of code.

It's less great in the real world because C++ beat it to the punch and has already filled the niche of extending C. And D doesn't have any huge company to sponsor it (and brainwash people into using it ;)).

le_y_mistar
Member #8,251
January 2007
avatar

personally, i wish Linus would shut his mouth, he says a lot of silly stuff and people take his words like gospel.

-----------------
I'm hell of an awesome guy :)

nonnus29
Member #2,606
August 2002
avatar

Quote:

It still sounds like rubbish to me. I agree C++ isn't a good high level language but you don't have to use all its esoteric features. If you only use it as a C with objects/polymorphism langauge then I would say that is far better than just plain C. Objects are useful 99% of the time and a language that supports them directly is infinitely better than one that doesn't.

In the thread they talk about this; it comes down to compiling C with the C++ compiler. At one time they tried to make the kernel compilable with both gcc and g++. Apparently it was extremely unpleasant. Even if the code is mostly C with a little C++, C++ compilers will perform funny business behind the scenes. I don't remember which post it was though....

BAF
Member #2,981
December 2002
avatar

That post says nothing about why C++ sucks, just shows a lot about why Linus sucks. The same could be said about C++, the choice of using C++ is to keep the C programmers out, and it works well.

Sirocco
Member #88
April 2000
avatar

Too many people take object oriented programming to a near obsessive-compulsive extreme and make things more complicated than they need to be. OOP is a tool like any other and should be utilized when beneficial and only to the extent needed.

-->
Graphic file formats used to fascinate me, but now I find them rather satanic.

Rash
Member #2,374
May 2002
avatar

nonnus29 said:

I don't think the Dmitry guy knows who he's talking to.

You're joking, right? Is Linus supposed to be some sort of royalty to be addressed reverentially?

Johan Halmén
Member #1,550
September 2001

Just laugh at it. What we need is:

"Hello, I'm C."
"And I'm C++."
...

Someone write some good scripts and I promise I can vrecord it. As long as the jokes are on C, not C++ :D Ok, jokes on anyone.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Years of thorough research have revealed that the red "x" that closes a window, really isn't red, but white on red background.

Years of thorough research have revealed that what people find beautiful about the Mandelbrot set is not the set itself, but all the rest.

ixilom
Member #7,167
April 2006
avatar

If C suits you, use it and stfu about C++.
If C++ suits you, use it and stfu about C.

Linux is better than windows !
No! Windows is better !

Blah ::)

I'm tired of hearing people bash languages/OSs/mp3players/etc, use what suits YOU and STFU. Don't advocate like a mormon why your choice is better and why everybody who doesn't agree is using something futile. >:(

I use C++, I don't need java, I don't need D, I don't need XYZ, thats why I STFU and simply use C++ as it suits me. 8-)

Ok, end of rant.

___________________________________________
Democracy in Sweden? Not since 2008-Jun-18.
<someone> The lesbians next door bought me a rolex for my birthday.
<someone> I think they misunderstood when I said I wanna watch...

Vanneto
Member #8,643
May 2007

You are all not better than Linus... If you want to be better than him, follow the suggestion of ixilom. He has a good point.

In capitalist America bank robs you.

nonnus29
Member #2,606
August 2002
avatar

Rash said:

You're joking, right? Is Linus supposed to be some sort of royalty to be addressed reverentially?

Yes, as an American I feel that royalty has long had a bad rap and welcome the day the (your?) f*cking Queen re-asserts dominion over Her former Colonies.

:P

To clarify, git is Linus' baby. Only a STFU-newb would go on it's mailing list and propose it be re-implemented in C++.

Billybob
Member #3,136
January 2003

C: "Hi, I'm C!"
C++: "..."
C: "Oh, that's C++. He's still compiling right now."

 1   2   3 


Go to: