Linus Torvalds and C++

Started by
149 comments, last by Anon Mike 16 years, 4 months ago
We already had this discussion a couple of months ago and we mostly all agreed that C is better for large projects that are mantained/updated by many people who do not have (do not want) to learn the intrinsics of complicated object oriented utility libraries used in the project in order to collaborate with it.
[size="2"]I like the Walrus best.
Advertisement
Quote:Original post by owl
We already had this discussion a couple of months ago and we mostly all agreed that C is better for large projects that are mantained/updated by many people who do not have (do not want) to learn the intrinsics of complicated object oriented utility libraries used in the project in order to collaborate with it.


Sounds like an interesting discussion. Link?
Quote:Original post by rip-off
Of course, he is completely right.

Except about choosing C instead, but that stems from the fact that he is primarily a kernel developer.

His response was about the use of C in git, not the Linux kernel, so the lack of portions of the SC++L and exceptions doesn't apply (unless git is incorporated into the kernel, which I certainly don't hope). The right tool for the right job, just because he normally uses C doesn't mean he always should.

Also his arguments were nothing like that, so while you may regard his conclusion as correct the argument itself could be flawed. He said:

  1. Abstractions (used in a derogatory sense) are inefficient and without them C++ is simply C.

  2. C++ programmers tend to be terrible programmers who doesn't understand the realities of software engineering, only useless CS theory. C programmers on the other hand are generally demi-gods capable of programming for any system better than an automated tool (like a compiler or optimizer).

  3. SC++L and boost are instable, non-portable, inefficient and causes infinite amounts of pain.

  4. OO is "idiotic crap".


1 is the same argument we see time after time when C# and Java are described as slow. There may be some truth to it, but I doubt git needs that much speed and I also doubt it even results in faster code. 2 is probably true because of how complicated the C++ language is, and in a fairly open collaborative programming model it could be a serious problem. It could however be avoided by looking at some decent high-level alternatives instead. 3 is just stupid in my opinion, SC++L is at least portable to all platforms with gcc. Boost may not be as portable, but it isn't an integral part of C++ either and I would still be surprised to find a Linux distribution which didn't come with a compiler capable of handling most of Boost. I don't guess I have to comment on 4; it simply shows how arrogant he is.
Linus Torvalds, Unprofessional?
[size="2"]I like the Walrus best.
Quote:Original post by Spoonbender
Incompetent C++ programmer. I don't know enough about his coding skills to judge him as a kernel (or C) programmer, but I'm sure he's good enough to get the job done there.

I still stand by my point: While he might be a reasonably competent hacker, he is an incompetent programmer. The days of code hacking are long gone, but he didn't realize this. An OS kernel has long been the last refuge for this dying hacker species, since they used the arcane myths surrounding the kernel as an excuse to justify bad coding within their small elitist circles.

Well, it's not. A kernel has nothing magic or mystical. It's just a piece of code, not a trivial one, but not an immensely complex one either. Try to implement a thermodynamic stress analysis system for composite materials, for example, and then come back and we'll see if you still say that writing a kernel is hard...

Writing low level code is no excuse for bad programming and code design. There is no reason to not write elegant and modular kernel code that is easy to understand and maintain.

Now, take a look at some of Torvalds work. I'll let it as an (easy) exercise to the reader to count the number of gotos at completely ludicrous places. Seriously, would you like to be assigned to work on code like this in your company without getting a 500% pay rise ?

A good programmer also knows to use the right tool for the job. OK, so you prefer C for kernel development. That's fine, as long as you know why you're doing it. A good programmer constantly questions his choices, and tries to objectively re-evaluate them. Programming language fanboy-ism is a primary sign for ignorance.

Nope, I'm sorry, but I still think that Torvalds is an incompetent programmer.

[Edit: oh, and when using 'you' in this post, I didn't mean to adress Spoonbender, eventhough I quoted him. I mean to adress the Linus-is-god crowd]
Quote:Original post by Yann L
Nope, I'm sorry, but I still think that Torvalds is an incompetent programmer.


To me, the only incompetent programmer is the one that doesn't deliver. And the hell if he didn't deliver!
[size="2"]I like the Walrus best.
Quote:Original post by rip-off
I prefer writing C++ to C, because I like RAII and the Standard C++ Library and boost. But I prefer writing other languages to C++

Absolutely agree.

That doesn't excuse Linus from being a jerk, but it does make me wonder how D is coming along.

XBox 360 gamertag: templewulf feel free to add me!
Quote:Original post by CTar
Also his arguments were nothing like that, so while you may regard his conclusion as correct the argument itself could be flawed.


Of course. I was agreeing with him for dramatic effect [smile].
Quote:Original post by owl
Quote:Original post by Yann L
Nope, I'm sorry, but I still think that Torvalds is an incompetent programmer.


To me, the only incompetent programmer is the one that doesn't deliver. And the hell if he didn't deliver!

No, no no no no. You obviously have never worked on a legacy system before. There are LOTS of incompetent programmers. I would dare wager that most people working in the field are only able to copy-paste a program together from online tutorials they can google. There are a lot of really bad programmers, and they get by because nobody fires them when someone else cleans up their shit.

I rather much enjoy a language that protects shitty programmers from themselves, because it protects me from them as well, especially when I have to clean up after them.

[Formerly "capn_midnight". See some of my projects. Find me on twitter tumblr G+ Github.]

Agreed. But I really don't think Torvalds fits that description.

Millons of people arround the world are using and keep waiting for the things he created/collaborated. Was he somewhat harsh to an annoying clueless I'm-nobody-I-made-nothing newbe posting in a freaking forum, who gives a damn? I don't.
[size="2"]I like the Walrus best.

This topic is closed to new replies.

Advertisement