Going completely off topic (not that we really have a topic here..)
They say the same thing about C. The C++ people say "C is obsolete, don't bother with it", but you can see that C++ is more likely to die before C will. I doubt that they will ever write an good OS in C++.
Could you explain this please? I keep saying statements like this, or expressing similar sentiments regarding C vs C++, and I never understand them. To my mind, C++ is just C with a few additions (new/delete, class, templates), so what makes C better then C++? Since, as far as I know, any C program is a valid C++ program (with the exception, of course, of C programs that use C++ keywords, which is a stupid "exception"), so what makes C so much better?
I personally see C++ as better, firstly because I prefer new/delete vs malloc/free, just semantically. Secondly because I like OO programming, so I tend to use it in most of my "larger" projects, and having to deal with lots of "OO" code written in C has made me bitter. | [reply] |
C++ is C with a few additions, but they are huge additions. Objects are a big change with all kinds of complexity. Templates are big and complicated.
Sure, C++ can be used a better C. But the OO is the big benefit and that is a big change.
Objective-C is a much better example of small extensions to C.
| [reply] |
Well, ok, so objects are a big addition. But it's just that, an addition. Why couldn't you write an operating system, or a device driver, in c++?
| [reply] |
I doubt that they will ever write an good OS in C++.
Yes they will, and they already have, considering all C code is C++ legal :-p.
Okay, I know what you actually meant, and I think I agree. I haven't done extensive testing myself, but from what I've heard, the overhead of objects would prohibit something as performance-oriented as an OS.
I also agree about the whole 'dilution' thing...I took a VB class in high school, and the teacher made me comment the function for the 'quit' button, which was as follows:
sub buttonQuit_Click()
frmForm.Close()
end sub
She told me I had to comment it so 'future maintainers of my code would know what the function did.' My jaw dropped, arguments ensued, and I stopped taking computer courses at my high school. | [reply] [d/l] |