3 ms·
Both XNU and Windows have a decent amount of C++ in it. Sure, people avoid some parts of C++, however there is a reason why they use C++.
by adamnemecek 6y ago
Both XNU and Windows have a decent amount of C++ in it.
Sure, people avoid some parts of C++, however there is a reason why they use C++.
- spijdar 6y agoMy understanding is the windows kernel is mostly C, with some highly-restricted C++ portions with most of the C++ runtime-dependent bits carefully avoided. XNU is entirely C except for IOKit AFAIK. My understanding is a lot of C++'s higher level features require pretty thick runtime support and complicate kernel level code to the point the traditional wisdom I've heard in both the hobby world and linux spheres is "Avoid C++ like the plague" or "use C++ but be careful to avoid using exceptions/RTTI/etc". It looks like Skift (and Haiku, apparently!) are mostly using the "watered down" C++, mostly for classes and templated generics, which is a good reason to use C++, yes.