Is it possible to write an OS in C++. If so would it be stable?
Printable View
Is it possible to write an OS in C++. If so would it be stable?
Lots of things are possible in C++. The stability isn't really dependent on the language, it's dependent on your code quality.
I wouldn't write an OS in C++, it's far too fluffy, which is why most systems programming is still in C (C++ requires a lot of behind-the-scenes work, unfortunately without your OS or runtime support none of these can function).
So basically the absolute core of the OS (bootstrap and similar things) would be written in assembly. Based on that there would be a large layer of C that covers most of the basic functionality. If you have that you can write or port a C++ compiler compiler for the OS and write the remaining features in C++.