3 ms·
Not to mention: what C++ subset to use, and how to deal with the endless discussion-circlejerks around that one topic alone. For instance most of the C++ stdli
by flohofwoe 3y ago
Not to mention: what C++ subset to use, and how to deal with the endless discussion-circlejerks around that one topic alone.
For instance most of the C++ stdlib is useless for kernel (or embedded) development, so you end up with a C++ that's not much more than a "C with namespaces". At least Rust brings a couple of actual language improvements to the table (not a big fan of Rust, but if the only other option is C++, then Rust is the clear winner).
- jeffbee 3y agoNone of the C stdlib can be used in the kernel, either, and yet the kernel is written in C. Zircon is an existence proof that you can use the C++ std library in a kernel. Do they use every damned thing in std? No, but they do use array, pair, unique_ptr, iterators, and more.
- SAI_Peregrinus 3y ago> None of the C stdlib can be used in the kernel, either, Except the bits allowed in a freestanding environment and (stretching the definition of "used in") the "nolibc" partial C standard library the kernel includes for environments that don't have any other libc available (`tools/include/nolibc`, mostly used for kernel tests where there's no userspace at all).