Hello,
I want to know what will make me write my OS in C or in C++
why some people use C and others C++ ?
By the way, in the both languages we will use ASM.
C vc C++
- Pype.Clicker
- Member
- Posts: 5964
- Joined: Wed Oct 18, 2006 2:31 am
- Location: In a galaxy, far, far away
- Contact:
Re:C vc C++
oh! what a smart answer ...sfdgb wrote: you write it in html
Picking either C or C++ is merely a matter of taste, personnal experience, and how "fluent" you're in the language you pick ...
Re:C vc C++
RTFAQ, please.
What language you use is purely a matter of personal preference, provided that language you choose is suitable for low-level programming (that is, it isn't specific to an existing OS, and it requires little if any runtime support from a library or interpreter). C is the most commonly used language mainly because it is familiar to most OS developers, and there is a large body of literature available about OS development in it. C++ requires more runtime support, but certainly can be used.
Of course, as you pointed out yourself, no matter what languages you write parts of the OS in there are some parts which must be written in assembly. It is always possible to write the whole OS in assembly, but most programmers don't have the patience and skill to manage that. If you think you can manage it, however, you should feel free to try if you wish.
You may wish to consult the 'Language Design' threads in the General Programming message board. HTH.
What language you use is purely a matter of personal preference, provided that language you choose is suitable for low-level programming (that is, it isn't specific to an existing OS, and it requires little if any runtime support from a library or interpreter). C is the most commonly used language mainly because it is familiar to most OS developers, and there is a large body of literature available about OS development in it. C++ requires more runtime support, but certainly can be used.
Of course, as you pointed out yourself, no matter what languages you write parts of the OS in there are some parts which must be written in assembly. It is always possible to write the whole OS in assembly, but most programmers don't have the patience and skill to manage that. If you think you can manage it, however, you should feel free to try if you wish.
You may wish to consult the 'Language Design' threads in the General Programming message board. HTH.
Re:C vc C++
Thank you very much Schol-R-LEA and you Pype.Clicker but no thanks to sfdgb for his smart answer.