• Ephera
    link
    fedilink
    arrow-up
    18
    arrow-down
    1
    ·
    4 years ago

    Well, most programming languages since C++ were just straight-up unusable in a kernel.

    The likes of Java, Python, Haskell need a kernel already up and running, so that they can start their virtual machine to execute your code.
    And even some languages that don’t need that, like Go, were unusable for kernel development, because you have basically no control over memory allocations.

    Ada probably failed to gain popularity in kernel development, because there were only proprietary compilers at first, so it never gained much mind share in the open-source community in general.

    And besides that, a large part of it was that C wasn’t that bad yet (in comparison to the then-modern programming languages).

    But Rust is also just really fucking good. We haven’t seen a low-level language with that much funding in decades. And it has a type system that rivals the most competent high-level languages (Haskell, OCaml, Scala etc.).

    In particular, it also promises to eradicate memory-related bugs which make up about 70% of vulnerabilities in the kernel.

    There’s also this post to the Linux Kernel Mailing List, which explains why or why not Rust (doesn’t compare it much to other languages): https://lkml.org/lkml/2021/4/14/1023