Re:Linus Torvalds on C++
by javadyan on Monday February 27, 2012 @08:50PM
(#3641450)
I've used Monotone. It's pretty horrible if you ask me.
[ Parent
| on HN ]
Re:Linus Torvalds on C++
by andrewflnr on Monday February 27, 2012 @11:34PM
(#3641895)
In what way is it horrible and (in reference to others in this subthread) how is it due to it being written by C++ programmers?
For one, it is horribly slow. I do not know for a fact that its slowness is caused by C++ as a language or by the quality the programmers who wrote Monotone... but it is slow nevertheless and that is all I know. By contrast, git is extremely fast. Go figure.
Re:Linus Torvalds on C++
by andrewflnr on Tuesday February 28, 2012 @11:45AM
(#3643777)
According to the wikipedia article about it, it's caused by obsessive cryptographic checking.
It has nothing to do with the fact that it is written in C++...
Re:Linus Torvalds on C++
by sirclueless on Monday February 27, 2012 @09:56PM
(#3641669)
And everything to do with the fact that it was written by C++ programmers.
Doom3 was written in C++ by John Carmack.
John Carmack is a C programmer coding in C++ which fits pretty well with sirclueless's point about that it is the C++ programmers that are the problem. All his games before Doom 3 were implemented in C.
Re:Linus Torvalds on C++
by lclarkmichalek on Tuesday February 28, 2012 @03:37AM
(#3642424)
I 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.
My 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
The book I mentioned, "Large Scale C++ Software Design":
http://www.amazon.com/Large-Scale-Software-Design-John-Lakos...