Linus Torvalds and C++

Started by
149 comments, last by Anon Mike 16 years, 4 months ago
I can appreciate Torvald's hatred of C++: it just lacks so many features a good language should have (closures and reflection particularly). However, there are much better languages than C++ out there. Let's start with Python, as I actually know that. Or from what I hear, Ruby. Or the old warhorse, Lisp (although that has it's fair share of detractors; it certainly doesn't look pretty). I can't say I'm a huge fan of Java or C# - they still have to much C/C++ in them IMHO, although C#'s a pretty good compromise. But it's a version control system FFS, it's hardly going to be using masses of CPU. And don't tell me 'maybe he doesn't know Python', you can learn Python in one day if you're a good programmer.

On the other hand, he has pretty successfully lead the development on what is probably the largest community software project for over a decade. Even for people who don't use Linux (and I'm using it now), we'd probably still be somewhere around Windows ME if Microsoft didn't think it had anything to worry about.
Advertisement
Quote:Original post by ZQJ
we'd probably still be somewhere around Windows ME if Microsoft didn't think it had anything to worry about.
Can we all please agree to avoid this kind of bullshit rhetoric? I'd hate to start dropping the rate hammer on people over something like this.
SlimDX | Ventspace Blog | Twitter | Diverse teams make better games. I am currently hiring capable C++ engine developers in Baltimore, MD.
Quote:Original post by ZQJ
I can appreciate Torvald's hatred of C++: it just lacks so many features a good language should have (closures and reflection particularly).

You completely missed the point. As if Torvalds would use closures and reflection. He probably doesn't even know what they are (or refuses to accept their existance). He doesn't criticise C++ for its actual deficiencies, but because it uses "idiotic OOP" and other such nonsensical statements.
Quote:Original post by ZQJ
I can't say I'm a huge fan of Java or C# - they still have to much C/C++ in them IMHO

Do you realize that now your reasoning sounds a lot like his? Not to mention the whole "better language" thing to start with. Languages are tools. Some of them are better for some situations than for others. C has its place. C++ has its place. So do Assembly, Java, C#, Python, Lisp and Ruby.
Quote:Original post by Lode
Why is C++ so hated in a lot of the open source world?


The OSS world is made up almost entirely of people who cannot get paid to write code.

It's only natural that they have irrational views which make no sense.



Ironically, I hate C++ as well, but for the exact opposite reasons as the OSS people. It *is* a horrible language, but it was wonderful before better languages usurped it.

The C++ committee took 9 years to decide that they're not even going to debate the merits of including multipass (moooltipass!) compiling in C++0x. This means, at the very minimum, this feature won't even get talked about (fuck even thinking about getting it implemented) for another decade.

I'm not waiting until 2019 to be able to compile C++ programs without dealing with retarded header file shit.
This is my signature. There are many like it, but this one is mine. My signature is my best friend. It is my life. I must master it as I must master my life. My signature, without me, is useless. Without my signature, I am useless.
Quote:Original post by owl
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.


So? Are you saying that just because people are able to use his "product", he's a good programmer?

Are you a good engineer simply if you build a bridge? Even if it falls over the next day, or if it requires constant attention from a team of (far more skilled) engineers to keep it upright, or if it can't carry as much as it was supposed to? Or if you're unable to make another one?

I'm sorry, I've seen far too much crappy, unmaintainable production code to agree with that one. A good programmer is one who writes code that's sane and can be maintained by others. The guy who started work on a product that a lot of people now use isn't necessarily one. He might be a successful programmer, but not necessarily a competent one.
I've always found the OSS community to be a bit stuck up and assuming their way is the best, in the majority of cases I've experienced. You could call it cliquey, I guess. I suppose that people, particularly among the Linux development community (and not necessarily the end users which, ironically, are often "power users" or even software developers themselves), would listen to Torvalds' views no matter how irrational or misguided they may be (which, IMO, his C++ views are), simply because he's the Grand Daddy, the father of Linux. It's like saying Bjarne Stroustrup would speak out against Java for a particular reason, and the whole community following him like the Pied Piper just because it's Stroustrup, regardless of how poor and misguided his arguments are.

As for Torvalds' views, I hardly think his views of C++ are valid given the appalling nature of some of the C code that got posted earlier in the thread. Anyone using goto ought to be pointed to and laughed at, then damned to Hell. If you're using that, then you've most likely got some kind of design flaw. That's advice I picked up from GDNet itself, by the way, and because of that I have never once used it in any serious projects.

"*YOU* are full of bullshit". Regardless of what the newbie thought, a comment like that is rude, unnecessary and completely unprofessional and I'm sure I'm not alone in saying I'd complain if anybody ever said that to me on GDNet.

His views on Boost and the STL don't hold any water with me; my understanding is that the whole point is that those make things easier as they're tried and tested by a group of the brightest users of the language and it's all standardised, whereas in C you'd have to reinvent the wheel and end up with some horrible hacked mess due to the general primitive nature of most of the C language. You could store your home-rolled code for later, but you'd likely have to adapt it sometimes and evolve it for different situations. I've never used Boost but I've seen it to have some nice features, and the STL is just plain convenience right there.

In actual fact, I transferred universities at the start of this academic year. At my final semester at the old one, I had to use C. I didn't take to it simply because it seemed to take so much more effort to do certain things in it. I've just finished a semester of C++ at my new University (having been picking away at bits of it on my own for years) and it's great; as I've done Java extensively I'm used to things being encapsulated and having a collection of classes forming an OO program, and I personally prefer it that way.

Sure C++ is complicated and has gotchas and caveats, but I'd say most languages do. I don't know too much about C because I hardly used it, but I'd say that C++ is immediately more intuitive and easier to get things done. TBH I think that's mostly because I'd used it before and already had a reasonable grasp of the basics, but it just seemed cleaner and easier.

It's like some of the "X vs Y" threads I see on these boards. Use the right tools for the job, regardless of what other people think, and I think Torvalds should consider that here; C and C++ both have their place, as do HTML and BASH shell scripting. It's highly unprofessional and just plain idiotic to trash one outright, IMO.
Quote:Original post by Spoonbender
He might be a successful programmer, but not necessarily a competent one.


Are you stating as a fact that Linus Trovalds carried out all his sucessful projects based on incompetence?

Amazing.
[size="2"]I like the Walrus best.
Quote:Original post by Spoonbender
I know about Singularity. But I doubt you've written a C# kernel yourself [grin]
But my point (and perhaps I should have been clearer) is that it takes a lot more infrastructure to get C++ (or C#) up and running in your kernel. C is relatively straightforward among other reasons because it's smaller, has a tiny standard library, and has a well-defined ABI. (and you will need to call into it from the bits of ASM you have)


I haven't, but of all the os' out there, I'd prefer to work on singularity.. :)

but yes, they partially used other languages, namely till the point they could run c# code (precompiled one, that is..)
but i _think_ they haven't used c? but it's been a while since i've read it.

for startup, one needs some as, but after that, any language can compile to the needed stuff, you just need the compiler for it.. means they needed some IL -> x86, and some tools to strip out the unneeded stuff.

anyways, using an old language for a modern os _is_ a bad thing. it's only use is legacy... but legacy is very important in the existing os world.. so it'll be c for linux for long, i'd guess.
If that's not the help you're after then you're going to have to explain the problem better than what you have. - joanusdmentia

My Page davepermen.net | My Music on Bandcamp and on Soundcloud

Quote:Original post by owl
Quote:Original post by Spoonbender
He might be a successful programmer, but not necessarily a competent one.


Are you stating as a fact that Linus Trovalds carried out all his sucessful projects based on incompetence?

Amazing.


You sir, need to watch more Inspector Gadget!
Old Username: Talroth
If your signature on a web forum takes up more space than your average post, then you are doing things wrong.

This topic is closed to new replies.

Advertisement