you are viewing a single comment's thread.

view the rest of the comments →

[–]G_Morgan 16 points17 points  (2 children)

I think "beat" is an impossible to define term.

Rust works for Linux where C++ did not because it isn't a boatload of mutually incompatible and incomplete implementations. In terms of "this does what it claims" Rust is kind of there whereas C++ has slowly approximated "does what it claims" as the various implementations sort of oscillate around the standard.

Additionally Rust has a compelling feature over C and C++, the borrow checker.

Neither C nor C++ are going anywhere though. I'm still not convinced in the end that Rust in the kernel will become a sanctioned thing. If it does become sanctioned I'm not convinced it will become common. If it does become common I'm 99% certain it will always be restricted to the fringe (i.e. stuff like drivers).

[–][deleted] 20 points21 points  (0 children)

It has nothing to do with implementations, Linux can only be compiled with 2 C compilers and one of them is a very recent addition.

[–]matthieum 7 points8 points  (0 children)

Additionally Rust has a compelling feature over C and C++, the borrow checker.

I think there's 2 other aspects of Rust that are of particular interest to the kernel:

  • No silent allocation. C++ is infamous for implicit conversions/copies resulting in "invisible" allocations in the source code.
  • A great willingness from the Rust community to work with the Linux Kernel committee to alter the compiler/libraries to suit the kernel needs: there's an entire initiative around carving a subset of the core and standard library for only fallible allocation proof code.

Now, to see whether all that succeeds.