7 ms·
Has anyone really not seen this in the last two years? Anyway, Linus may be a very experienced C programmer, but that doesn't mean his opinion on C++ carries m
by stephen_g 15y ago
Has anyone really not seen this in the last two years?
Anyway, Linus may be a very experienced C programmer, but that doesn't mean his opinion on C++ carries much weight... I'd be more interested on what someone who actually has a lot of experience in using C++ says. Especially with modern C++ and recent tools, libraries etc, which are very different from what was around five or ten years ago.
I suppose it is nice for a change for someone bagging out C++ (however inaccurately) to be advocating C instead of a managed or interpreted language though!
- nxn 15y agoHaven't seen it. I've seen many other examples of Torvalds being an ass, but I don't bother to keep track really. It does make me wonder though how he's able to get away with responses like that, when most other "founders" (not sure what the proper term here really is) would have the majority of their users/supporters just go elsewhere. EDIT: ... Let alone have supporters who get defensive enough to start downvoting someone who stated the obvious (he did act like an ass), while asking a reasonable question too.
- winestock 15y agoThis man is being downvoted unfairly. I've read Torvalds' post at the top of the page. I've also read the balance of opinion on this page. The majority view is that C++ really is a terrible language for writing a kernel. Fine, I accept that. Now re-read Torvalds' post. How many people here would want to work with someone who regularly expresses himself like that? I know, I know; substance is more important than image and so forth. But that post reminds me of what people said working with Steve Jobs was like before he died. Life is too short to work with jerks. EDIT: Removed excess snark.
- gaius 15y agoExcept it's not true: The Commodore Amiga delivered multi-tasking, shared objects and sophisticated IPC in only 256k of main memory. They cite OO techniques as being key. http://en.wikipedia.org/wiki/Exec_(Amiga) http://en.wikipedia.org/wiki/Exec_(Amiga)
- telent 15y agoWhat's not true? Exec used some OO techniques in non-OO languages. So does Linux. I can't see which post this was intended as a response to
- brodd 15y agoI'd say life's too short to beat around the bush.
- andos 15y agoYou are 100% right about not wasting one's time with jerks. But I disagree that Linus regularly expresses himself like one. Really: open lkml.org and search for his posts. Most of the time, he's an ordinary project maintainer. Sometimes, he's quite the opposite of a jerk [1]: WARNING! I wasn't kidding when I said that I've done this by reading gtk2 tutorials as I've gone along. If somebody is more comfortable with gtk, feel free to send me (signed-off) patches. Just as an example of the extreme hackiness of the code, I don't even bother connecting a signal for the "somebody edited the dive info" cases. I just save/restore the dive info every single time you switch dives. Christ! That's truly lame. One must remember that his role as maintainer of linux requires him to have ultimate, non-ambiguous opinion about a lot of stuff. He's the judge of what effectively goes into the "official" kernel tree. Moreover, most of the kernel contributors don't deal with him directly — git is the materialization of that modus operandi. When he does express himself like that, however, it becomes news. He always has a reason, though. In this case: Please don't talk about portability, it's BS. Is this how normal people start a conversation? Who's the jerk, here? [1]: https://github.com/torvalds/subsurface/blob/master/README#L136 https://github.com/torvalds/subsurface/blob/master/README#L1...
- burgerbrain 15y ago"It does make me wonder though how he's able to get away with responses like that" The man delivers.
- acqq 15y agoAnd more than that, he's right: if you care enough about things the kernel cares about, you really, really don't want C++ "idioms" in kernel. And you don't want to work with the people who don't understand that. So it's really convenient to piss such people off, just as he said: "for something where efficiency was a primary objective the "advantages" of C++ is just a huge mistake. The fact that we also piss off people who cannot see that is just a big additional advantage."
- nwmcsween 15y agoHe delivers personally but Linux as a kernel is a pile of crap, mass duplication mdadm vs dm posix capabilities vs actual unretarded capabilities... Linus is good at coding but absolutely horrible at direction and that's exactly what Linux needs a direction for the better instead of evolution of substandard abstractions.
- aidenn0 15y agoI haven't worked closely with Torvalds, but I have worked with other OSS project leads that have such asshole responses roughly proportional to the popularity of the project, and have a theory on it. I don't know if it's intentional or not but many OSS project leads respond like this to questions that come up a lot but don't merit a response. How many times do you think Torvalds has had to field "questions" of the form "C is crap, you should use C++, it's like C only better!" To a certain extent it is garbage in, garbage out, if you ask a stupid question, you get a stupid answer.
- pavanky 15y agoThis is the situation not only with OSS projects, but BBS, forums and / or IRC chat rooms in general. Given the technology, it is amazing tha we haven't developed bots that will automatically answer these questions based on previous responses.
- slowpoke 15y agoThat wouldn't even be too hard. I've seen some help channels that have bots with commands to answer FAQs (mostly in the form of "here is a link, READ IT"). A simple question answering AI would be interesting, though.
- pavanky 15y agoThat still needs human intervention. I think stackoverflow has a bot named community. I am not completely aware of how it works, but if it is completely automated, it is good.
- MBlume 15y ago"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." Come on. Dude was picking a fight, and he got it. Maybe there are other examples of Linus being an ass, but I don't see how this qualifies.
- Daniel_Newby 15y agoThis is a cherry-picked email that, while abrasive, does not single out any particular person for abuse. Messages about individual people on the linux-kernel mailing list are usually pretty professional. (Mind you, they rarely get as downright friendly as the Perl or Python people.)
- wisty 15y agoIf Torvalds is either nice 99.99% of the time, and 0.01% of the time gets involved in flame wars, guess which gets reported?
- droithomme 15y ago"I'd be more interested on what someone who actually has a lot of experience in using C++ says." I have considerable experience with C++, going back to when it was called C with Classes and you used a preprocessor to convert C with Classes code to C and then compiled the C. What Linus says is pretty much true. I don't expect it to matter though since when people say "I'd be more interested on what someone who actually has a lot of experience in using C++ says." they don't really mean it. There is another guy I know of with considerable experience in C++, Yossi Kreinin, who knows more about C++ than Stroustrop. He has a very nice web site that is one of the best references in C++ I have seen, going far deeper than others. Yossi is the number one expert on C++ in the world today. I recommend his insights to all: http://yosefk.com/c++fqa/ http://yosefk.com/c++fqa/
- beatle 15y ago"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." So what's his excuse? RE: Linux
- andywood 15y agoI've used C++ more than any other language, both professionally and for personal projects, for 13 years. I freely admit that C++ is complex, and it takes considerable effort to understand how to write good C++ code. Even after 13 years, I know that I do not know every rule. Nevertheless, I have been very productive with it. I got about 3 pages into the meat of the FQA. I can't bring myself to spend the time to go further, because his counterpoints already seem overwhelmingly specious to me. This leads me to wonder on what grounds you characterize him as "the number one expert on C++" "who knows more about C++ than Stroustrup". The best reference on C++ that I have seen remains the C++ FAQ. (http://www.parashift.com/c++-faq-lite/ http://www.parashift.com/c++-faq-lite/) I have also always enjoyed Stroustrup's guidance on his language, and I'm inclined to continue believing he knows at least as much about his own language as anybody, until I see some more convincing evidence to the contrary.
- astrodust 15y ago
- hndl 15y agoI think we're missing the point here. Taking the side of the customer of git, I'm happy. I type things on a CLI with git and things happen pretty fast. I'm happy. I don't care whether you wrote it with C, C++ or Haskell. It works. It works just fine. To Linus's point, I've never used, or even heard of someone using Monotone. That must say _something_.
- javadyan 15y agoI've used Monotone. It's pretty horrible if you ask me.
- X-Istence 15y agoIt has nothing to do with the fact that it is written in C++...
- sirclueless 15y agoAnd everything to do with the fact that it was written by C++ programmers.
- Maro 15y agoDoom3 was written in C++ by John Carmack. https://github.com/mtrencseni/doom3 https://github.com/mtrencseni/doom3
- lclarkmichalek 15y agoI imagine he had some help with that. And a lot of what he's been talking about recently is about tools for keeping code quality high; he obviously places a premium on good code over working code.
- Maro 15y agoMy point is, you can write good, readable, performance, large-scale codebases in C++. Note that Carmack wrote his previous engines such as Quake3 in C, and switched to C++ at some point. I think one of the reasons was that as their programming team size grew from 5 to 50 at id, C++ started making more sense for them. If you look at a book like "Large Scale C++ Software Design", the subset of C++ it uses is about the subset that I think makes sense in practice, roughly C with classes. To be fair, I think that was the language subset that actually worked in compilers at that time. Irrespective, I don't doubt that C is a valid and perhaps better choice for writing an OS kernel. There's less abstraction in C, and you have to worry less about making sure you don't use a language feature of C++ that has a hidden cost. https://github.com/mtrencseni/quake3 https://github.com/mtrencseni/quake3 The book I mentioned, "Large Scale C++ Software Design": http://www.amazon.com/Large-Scale-Software-Design-John-Lakos/dp/0201633620 http://www.amazon.com/Large-Scale-Software-Design-John-Lakos...
- aidenn0 15y agoI work with both C and C++ regularly. I don't like C++, but I like C. Counterintuitively I think the underlying reason is that C++ follows the exact same philosophy as C. For all of the following statements you can replace C with C++ and it is equally true: Every feature X acts in such a way to make implementing it at the time of its invention as expedient as possible The best heuristic for guessing how a feature you don't know (or forgot) works in X is to say "let's imagine X was just as it is now, only without this feature, how would I implement it?" All of this means that in order to be a competent X programmer, one ought to be able to write an X compiler without too much outside help. I could go on and on like this, but hopefully you get the point. Now it is clear that the philosophy for X works for small languages (like C) but could easily have scaling problems (like C++). It also becomes clear why so many places subset C++, but don't pick the same subset. The problem isn't that some feature is broken, the problem is that there are too many features without an overriding rule that most people can apply. I would also believe that Bjarne Stroustrup can be quite effective programming C++ since he knows the language intimately enough.
- kowsik 15y agoI've been writing C and C++ for a long time (kernel and user mode) and what I find is, it takes a fair bit of discipline when writing C++ code (like hiding new/delete for stack-only objects or ensuring operator= works for heap objects and so on). Debugging with STL and templates can be PITA since the error messages are so convoluted in most compilers. One thing I would agree on Linus, is the talent pool of disciplined C++ programmers is pretty scarce. There are tons more C programmers that have enough OO experience of faking vtables and building structs-with-callbacks to simulate class inheritance and what not.
- GiganteX 15y agoLinus is full of BS. To say that STL and Boost is total crap, that he likes to piss off C++ coders, and that he actually seems unable to see the advantages of C++ to C.. only shows his own ignorance, and that he has a huge chip on his shoulder. I'm very disappointed.