Results 1 to 6 of 6
Thread: C Vs C++
Enjoy an ad free experience by logging in. Not a member yet? Register.
C Vs C++
why in system side programming we mostly use C.
C++ is just superset of C and supports all C functions.and it also has oops.
Even if you want C codes ,you can use them within C++.
Do we have any file system or other system programs written in C++?
It's sort of to enforce simplicity - you wouldn't want classes or C++ error handling in an operating system's kernel, so why use a language that includes them when one without will do just as well? C++ is great for application-level stuff, but for system programming its extra features just really aren't needed, and you want to keep tight control over memory management, hardware, basically everything that's going on behind the scenes. At least that's the way I see it...I have sold my soul to the penguin
MHM...I agree. C is good enaugh for building kernel.
02-05-2007 #4Originally Posted by burntfuse
C offers free form of coding than c++...so we chose to ignore C++ ??
Those features just really aren't ever going to be used in the kernel, though, and they shouldn't - the kernel should (as I said before) keep a tight reign on what's happening behind the scenes, since it's working at the lowest level. If you used C++, then people might start using vectors and other crap where they don't belong. Using C++ for the kernel where it only needs C is sort of like writing some simple code for a PIC (which should be in assembly) with the inline assembly directives in C.I have sold my soul to the penguin