4 ms·
Linus Torvalds on C++
- Zelmor 10y agoI have been looking for an up to date website framework like werc (on which cat-v runs) for a personal site, blog, photo gallery, but could not find anything. I am seriously bothered by the amount of bloat that is present in self-hosting projects, qhere the latest and greatest flashy javascript libabry needs to be a baseline feature, and you definitely will need a non-relational database just to be able to host a bloody blog/site. I just want something like werc but in active development...
- 4ad 10y agoWerc is in active development. When we find a problem, we fix it. Fortunately, werc doesn't have problems to fix very often.
- Zelmor 10y agoCould you point me towards your repository please? Edit: I see 3 months old changelogs in the dev branch. Those weren't there the last time I checked. huh
- peterevans 10y agoWell... not to be a C++ apologist, but bear in mind that these comments were made by Linus back in 2007 and 2004. His views may not have changed, but C++ has certainly changed since then.
- 4ad 10y agoYeah, all those billions of lines of code of old C++ just rewrote themselves, so we don't have to worry about them.
- hhjkjhkjhhlkj 10y agoI think this is the sort of view that he has problems with. It shows that you haven't understood any of his actual issues. It is a mindset thing as much as just C++ being `unhelpful`. Not that it is in the posted email but one of his issues is that on-one actually understands C++, but everyone thinks they do.
- peterevans 10y agoI think I understand Linus' concerns. I guess I'm not sure how you conclude that I do not, but, so it goes. Languages do change, and implementations evolve. I think it's fair to temper criticism with the caveat that, hey, this was from a while back. And Linus' comments certainly were from a while back, considering the latest one was made in 2007. You didn't have shared_ptr, you didn't have unique_ptr, there was no auto type. I'm not going to argue that these things make C++ awesome. I really don't work in C++ on a day-to-day basis. But the language is certainly different now than it was in 2007, and I think that does matter. At least a little bit :)
- drvdevd 10y agoI think the number one legitimate concern I can see, after just reading this for the nth time, is the trustworthiness of C++ compilers, which I believe was not so great in the early 90s. Now, I have no evidence to back this up (yet), but I'm willing to bet that clang and LLVM are verging on as trustworthy as (if not more than) GCC at this point. Nevermind MSVC, which would require its own analysis. I'm not a C++ programmer, but you're right: clearly it has advanced. And Linus has gone off on GCC as well for producing crappy output as well (https://news.ycombinator.com/item?id=8089321 https://news.ycombinator.com/item?id=8089321)
- gpderetta 10y agoThen again, his latest project, a scuba diving application, is written in C++.
- hhjkjhkjhhlkj 10y agoIt's not doing anything where performance is an issue.
- nervoustwit 10y agoHe says C++ is not good for writing things like kernels, not that is good for absolutely nothing.
- gpderetta 10y 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. 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." I wouldn't call that a nuanced opinion.
- bbatha 10y agoI watched a video on this a few years ago, his reason for C++ is because QT basically requires it. He originally tried to write it in C using GTK, and hated GTK so he switched to C++/QT.
- mrSugar 10y agoSo, he hates GTK+ more than he does C++? what does that tell us about GTK+?
- stuaxo 10y agoThis never gets old.
- snhkicker 10y agoThis was written when someone just said to you > 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. no reason to rage when some tells you to change your whole project because he doesn't like your choices you can ignore him but sometimes you don't (he should have skipped the email), This isn't C++ bashing more than just being angry someone told you change your design because C isn't easy to handle strings with(Said in the emails).This is just someone getting angry because you are making him look guilty(in his mind) for not making a different decision when he clearly doesn't even need to do this work and if you don't like his work don't use it man, Sometimes people get angry for small reasons we all do but some get angry more than others but doesn't mean the angry bashing is his opinion or what reality is. C/C++ or whatever isn't really compared here.
- bhaavan 10y agoWith all due respect to Linus, this mail chain is just unreasoned argument. He vaguely mentions poor memory management and nothing else which is faulty in C++. It would have been helpful to reason out his choices then go on tirade of slang.
- hhjkjhkjhhlkj 10y agoLinus's view on C++ (at least in the kernel) are generally well known. Also he was not the first to start on BS remarks in this particular email thread.
- mlvljr 10y agoThis link again??
- onestone 10y agoThis is 9 years old. Linus has been happily writing C++ for some time now. For example: https://github.com/torvalds/subsurface/commit/56ed3f1c6119b9ac86f602455d54318623640056 https://github.com/torvalds/subsurface/commit/56ed3f1c6119b9...
- reacweb 10y agoLinus wanted to compile the kernel in C++ in 1993, but there were bugs in the compiler and performance issues (related to exceptions if I remember well). He has switched back to C in 0.99.13: https://github.com/kernelslacker/linux-historic-scripts/blob/master/changelogs/0.99.13.txt https://github.com/kernelslacker/linux-historic-scripts/blob... I think his hate of C++ comes from this bad experience.
- bovermyer 10y agoRants like this can be seen as good examples of behavior to discourage. Linus has several positive traits, but compassion and humility are not among them. Generally speaking, we should not give someone a pass on poor behavior just because they're technically talented.
- gpderetta 10y agoWhen Linus speaks, you shut up an listen; he is an incredibly competent engineer and is opinion is always worth something. Then again, when Linus rants, you take out the popcorns, sit on the side and just enjoy the show.
- JoeAltmaier 10y agoHm. I've read the Linux kernel. It was not so good. I'd go so far as 'competent'.
- feduzi 10y agoCan you pinpoint at least several exact places of "not so good"?
- democracy 10y ago>> In fact, in Linux we did try C++ once already, back in 1992. Wow, I didn't know they had computers back then!!!