Results 1 to 6 of 6
Hi all,
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 ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 02-03-2007 #1
C Vs C++
Hi all,
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++?
Thx.First they ignore you,Then they laugh at you,Then they fight with you,Then you win. - M.K.Gandhi
-----
FOSS India Award winning ext3fs Undelete tool www.giis.co.in. Online Linux Terminal http://www.webminal.org
- 02-03-2007 #2
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
- 02-04-2007 #3
MHM...I agree. C is good enaugh for building kernel.
- 02-05-2007 #4
This where i still got some doubts,when C++ provides extrax features ,you might use them in future....it also allows usage of C codes.then, is it correct to say,
Originally Posted by burntfuse
C offers free form of coding than c++...so we chose to ignore C++ ??First they ignore you,Then they laugh at you,Then they fight with you,Then you win. - M.K.Gandhi
-----
FOSS India Award winning ext3fs Undelete tool www.giis.co.in. Online Linux Terminal http://www.webminal.org
- 02-05-2007 #5
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
- 02-06-2007 #6
Thanks all for your clarification
bye....
First they ignore you,Then they laugh at you,Then they fight with you,Then you win. - M.K.Gandhi
-----
FOSS India Award winning ext3fs Undelete tool www.giis.co.in. Online Linux Terminal http://www.webminal.org


Reply With Quote
