4 ms·
C++ isn't substantially different from C when it comes to systems programming concerns regarding stability. The biggest issue is that it's a bit harder to main
by teacup50 10y ago
C++ isn't substantially different from C when it comes to systems programming concerns regarding stability.
The biggest issue is that it's a bit harder to maintain ABI compatibility. You have to carve out reserved vtable space, avoid exposing STL in your interface, etc, but it's doable.
As for Swift, it has heavy userspace dependencies that make it non-viable for kernel work. Rust does much better there.
- pjmlp 10y agoDepends if developers insist on C with Classes or are clever to take advantage of the language features that make it a safer language. Regarding Swift, C developers used to tell me C++ would never be used to write kernels, because it had a runtime and was too bloated. Since those days, I have seen BeOS, Symbian, Genode, Mac OS X IO Kit, Windows 8+ Kernel Driver Framework. Also not to forget, Objective-C kernel code used in NeXT. Also the biggest open source C compilers are nowadays written in the language which those C developers considered too bloated for any real work.