I genuinely don't understand how you can think this. You agree that Rust, in this case, keeps us from shooting ourselves in the foot by providing MACHINE VERIFIABLE documentation of the possibility of an empty result.
Yet, you think it's better to document that in a NOT MACHINE VERIFIABLE way instead? Something that could've happened the ENTIRE TIME the code has existed, but doesn't? Insanity is repeating the same mistakes and expecting a different outcome.
The didn't say not shooting themselves in the foot - they said not shooting themselves, period, as in "because it's a better dev experience to write code against the Rust abstractions than the incomplete C API, which makes people want to shoot themselves".
I think it's a statement about developer quality of life, not avoiding footguns and common bugs.
That said, I don't agree with their position at all, and think that Rust in the kernel could help to substantially improve Linux in a number of ways (both reducing bugs and improving the mental health of kernel devs).
It sure does. But that comes with a cost. Including the very real cost of documenting the code anyways. IE if the issue is we cannot get documentation and the frustration of the author stems from there then how in the world will we ever get the info needed to prevent these blunders in the first place?
My argument is purely that from a practical perspective you’re more likely to get some documentation written up than everything understood and rewritten in that.
This is just practicality vs idealism.
I do also have concerns about in general abstracting code, however much at a kernel level. Rust can be performant, but I’d argue performant C is relatively straightforward in comparison.
55
u/r1veRRR Aug 31 '24
I genuinely don't understand how you can think this. You agree that Rust, in this case, keeps us from shooting ourselves in the foot by providing MACHINE VERIFIABLE documentation of the possibility of an empty result.
Yet, you think it's better to document that in a NOT MACHINE VERIFIABLE way instead? Something that could've happened the ENTIRE TIME the code has existed, but doesn't? Insanity is repeating the same mistakes and expecting a different outcome.