you are viewing a single comment's thread
view the rest of the comments
[–] 137 points 2 years ago (2 children)

There is no C++ allowed in the Linux kernel and Linus has gone on several major rants about how terrible a language it is.

  • source
  • parent
  • hideshow 4 child comments
  • [–] 53 points 2 years ago (4 children)
  • [–] 85 points 2 years ago (2 children)

    According to the github analysis, the kernel repository is:

    • C 98.3%
    • Assembly 0.7%
    • Shell 0.4%
    • Makefile 0.2%
    • Python 0.2%
    • Perl 0.1%
    • Other 0.1%

    So yeah, its basically all C, plus a tiny bit of assembly for very low level bootstrapping and some helper scripts.

  • source
  • parent
  • hideshow 4 child comments
  • [–] 30 points 2 years ago (1 child)

    Yeah but a lot of that C code has inline assembly so it's more like 5-10% asm.

  • source
  • parent
  • hideshow 2 child comments
  • [–] 13 points 2 years ago (1 child)

    Inline assembly is such a shit practice. But c++ bad.

  • source
  • parent
  • hideshow 2 child comments
  • [–] 17 points 2 years ago (1 child)

    Lots of core UNIX and Linux projects are. C++ is not liked by a lot of low level FOSS community. I think Rust is going to get further into these areas. I know C++ well but prefer C. I know plenty of others who feel the same.

  • source
  • parent
  • hideshow 2 child comments
  • [–] 3 points 2 years ago (1 child)

    I've read that they are writing parts of the kernel in Rust

  • source
  • parent
  • hideshow 2 child comments
  • [–] 4 points 2 years ago (2 children)

    Yes, I think Rust is a better C++ and will replace it in many places. Though all three will be around for ever to be honest.

  • source
  • parent
  • hideshow 4 child comments
  • [–] [S] 2 points 2 years ago (1 child)

    Yes, first Rust code was released in 6.6 I think and MS also started implementing Rust code in the Windows kernel.

  • source
  • parent
  • hideshow 2 child comments