
Originally Posted by
javalover
If you had known what a kernel is, you probably didn't suggest using Qt: a kernel is not simply a software.
You were referring just about usermode, but what does it has to do with the discussion?
And no, you can't consider C++ better than C without specifying in which context it is. A C++ programmer is not constrained to use exception handling, especially in kernel code, but why should you use that language which does that extension which you are not going to use? Same thing for the OO paradigm when writing kernel code. I would prefer to make use of simplicity, I don't want to have something more that I won't to use.
Seriously, if you don't understand this I don't want to continue an useless discussion with you.
C++ runtime is largely the C runtime, it hasn't nothing to do with it.
Did blatantly just leave my comments unread but still decided to reply?
If you had known what a kernel is, you probably didn't suggest using Qt:
Oh my god, I never suggested using Qt on lower rings (you even can't!), I was talking about
regular program development, UI and so on.
a kernel is not simply a software.
Even though it's the base of the operating system,
it's basically just a big collection of binaries executed by the CPU.
Sounds like software to me.
And no, you can't consider C++ better than C without specifying in which context it is.
But I did? The context was general software development, for users. Like Utilities, Games, Tools, you name it.
A C++ programmer is not constrained to use exception handling, especially in kernel code, but why should you use that language which does that extension which you are not going to use? Same thing for the OO paradigm when writing kernel code. I would prefer to make use of simplicity, I don't want to have something more that I won't to use.
Correct, I would still prefer C over C++ in lower level development, but's that's the only area it beats C++.
Seriously, if you don't understand this I don't want to continue an useless discussion with you.
I believe I understand kernel level to the same extent as you do, if not even further. You just misinterpret my previous
comments, which is fine. Maybe I didn't write them clear enough.
C++ runtime is largely the C runtime, it hasn't nothing to do with it.
That's partially true, yes. C++'s STL inherits and extends the standard C libraries, but it's
also vastly different, wider and is structured so differently than the C libraries.
You were referring just about usermode, but what does it has to do with the discussion?
We are talking generally about which language is better C++ or C. When it comes to programming about
90% of the devs never, ever even approach kernel/ring0 development, so an argument from A famous guy
who basically only develops kernel modules, is pretty irrelevant for us, normal developers that target the Win32
or other usermode environments.
There are just so much more up-to-date, easy to use, advanced libraries for C++
when comparing what C has to offer. Don't get me wrong, C behind every modern
popular language in way or another, and still, today everything you can achieve in
higher level languages can be achieved in C too, that just means a little more work.
But back to the point, C++ has superseded C thus making it 'bit' obsolete for a
modern time programmer. There are much wider variety of libraries and interfaces
for C++ than there is for C. And you can complete your work with less lines of clean looking code
and have a faster output & better results with C++.
C++'s standard features and libraries are still being updated and maintained while C's latest standard
update took place on 2011 and the previous one 1999.
C++ has much wider userbase and is richer on libraries.
It's 3rd party libraries are updated, new ones created, and old ones maintained more frequently than C's.
Final Blow:
- Templates
- Function overloading
- References
- Namespaces
- You can use structs and enums without writing struct or enum before every declaration or using typedefs.
Even if you don't define your own classes, using C++'s string and container classes is still often more convenient and safe to work with than c-style strings and arrays.
- Type safety (even though some would call it weak)
- Exceptions
- Variable declarations in conditionals, C99 only has it in 'for'
- Object Orientation
(pasted from:
http://stackoverflow.com/questions/3...-better-than-c)
Then there is the final factor why C++ is better than C:
You don't miss out on any features of C when writing C++ code, you can write mostly C, but then you can
take advantage of all of the C++'s libraries' features.
- - - Updated - - -

Originally Posted by
javalover
If you had known what a kernel is, you probably didn't suggest using Qt: a kernel is not simply a software.
You were referring just about usermode, but what does it has to do with the discussion?
And no, you can't consider C++ better than C without specifying in which context it is. A C++ programmer is not constrained to use exception handling, especially in kernel code, but why should you use that language which does that extension which you are not going to use? Same thing for the OO paradigm when writing kernel code. I would prefer to make use of simplicity, I don't want to have something more that I won't to use.
Seriously, if you don't understand this I don't want to continue an useless discussion with you.
C++ runtime is largely the C runtime, it hasn't nothing to do with it.
Also, why the fuck is your name javalover? Java is an embodiment of what Linus Torvalds hates the most.
