|
|
|
|
|
by andrewstuart
1067 days ago
|
|
Pointing at C++ as bad doesn’t address my point. Kernel code should be easily readable and understandable, shouldn’t it? If Rust is complex and hard to understand won’t that lead to the kernel source code becoming a giant kablooie of complexity? Surely the relatively simple nature of C is what makes it suitable for large scale kernel development. Maybe the answer for more secure kernel code is C with better security analysis tools? |
|
Rust is hard/simple. The rules aren't complex. The constructs aren't complex. But it's hard to write because the rules are very restrictive.
Rust is also much easier to read than write (for a reader who understands the rules).
It's optimising for exactly the things you want in systems programming:
Easier to read than the write. Simple rules that are easy to understand but hard to follow, and that produce simple programs.
Compare that to C which is easy/complex. It's much easier to write than to read. It's easy to learn and write but produces code that's very complex. The rules are all by convention instead of part of the type system.