Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> One could argue that C++ is much more complex and hard to write correct code.

That is why in the Windows kernel, according to https://en.wikipedia.org/w/index.php?title=Windows_NT&oldid=..., C++ is rather avoided, and C is preferred for kernel code (for user-mode code, the priorities are reversed):

"Windows NT is written in C and C++, with a very small amount written in assembly language. C is mostly used for the kernel code while C++ is mostly used for user-mode code. Assembly language is avoided where possible because it would impede portability."



Someone has to update that entry,

C++ supported in the kernel since Vista,

https://learn.microsoft.com/en-us/cpp/build/reference/kernel...

"The new wil library for C++ code in drivers"

https://community.osr.com/discussion/291326/the-new-wil-libr...

> wil was primarily developed by the Windows shell team for writing usermode code, but the NDIS and Bluetooth teams have contributed some small kernel-specific features. Here's a few examples of how you can use wil in your kernel driver:


>C is mostly used for the kernel code

>C++ supported in the kernel since Vista

Both of those things code be true.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: