Why do operating systems do low level stuff in C and C++? Why not just C++?
Posted
by
Cole Johnson
on Programmers
See other posts from Programmers
or by Cole Johnson
Published on 2012-12-10T17:32:10Z
Indexed on
2012/12/10
23:17 UTC
Read the original article
Hit count: 391
On the Wikipedia page for Windows, it states the Windows is written in Assembly for the bootloader and task switcher, and C and C++ for kernel routines. This confuses me because AFAIK, you can call C++ functions from an extern "C"
'd block as C++ is just C with extra features (all of which can be rewritten in C if you wanted to AFAIK). I can get using C for the kernel functions so pure C apps can use them (like printf
and such), but if they can just be wrapped in an extern "C "
block, then why code in C?
So my question is: Why would a kernel be written in both C and C++ instead of just C++
© Programmers or respective owner