← Back to context

Comment by shadowofneptune

3 years ago

C++, Ada, and Rust would all be good choices if you want to use something other than C. The decision to me would come down more to the ecosystem.

C++ has in the last decade provided measures for memory safety. Online resources are plentiful and references are easy to get at a bookstore. There are many different compilers (a plus I'd say compared to the monocultures many languages have), but Clang and G++ are ones to look at in particular. They share many extensions to C++ which are useful in systems programming. Clang can be installed on Windows using MS Visual Studio, while G++ is Unix-like only. C++ has many different build systems to choose from, but CMake a common portable one.

Ada came from a similar time as C++. It focuses less on memory safety than Rust, but has more of a focus on overall program correctness. A subset of Ada, SPARK, can be formally verified. The language's culture has more of a focus on embedded systems than general systems programming, and has less of an online presence than the other two. You will have to use reference materials and books more than online guides compared to Rust or C++. The open-source compiler of note is GNAT, it supports both Windows and Unix-like systems. It comes with a build system.

Rust, as you probably know, has a huge focus on memory safety. Rust is in culture much more like newer languages such as Python. Forums are active, updates to the compiler are more frequent, and online resources are plentiful. The book describing the language is a living document available online, unlike the other languages listed. The compiler, build system, and package management system is the same for every supported platform. This to me is a big plus, though package management is not very important for kernel-level development.