1. Rust has pitfalls
2. Rust has idioms
3. Rust in kernel would have specific idioms
4. clang-format and uncrustify are two solid choices
5. Nothing is special about C that would make testing hard.
1. Rust has pitfalls
2. Rust has idioms
3. Rust in kernel would have specific idioms
4. clang-format and uncrustify are two solid choices
5. Nothing is special about C that would make testing hard.
2. You are cherry picking. He also said "These are hard to locate for most languages; I wouldn't know where to look in case of C." Rust has some advantages from for example Clippy and from a very newcomer-welcoming and helpful community.
3. Rust in kernel would indeed have kernel-specific idioms. But it'll probably be very similar to other embedded Rust and relatively easy for a newcomer to pick up. (Ee'll have to wait and see, but there is good reason to expect this.) C in kernel is known to be very hard for other C developers to pick up.
4. Thanks for the info.
5. But some things are special about Rust that makes testing easy.
6. The kernel doesn't deal much with text and even when it does, it generally doesn't need to deal with encodings (let alone modern encodings). That said, text is really a nightmare in C. Even just ASCII is needlessly complex due to null-terination, badly designed functions and the regular C UB pitfalls. At least you did acknowledge it may indeed be a problem for C compared to Rust.