4 ms·
It's not entirely a strawman. The steelman version: When replacing battle-tested code with newly-written code, you're going to encounter new bugs. Guaranteed.
by hn_go_brrrrr 4y ago
It's not entirely a strawman. The steelman version:
When replacing battle-tested code with newly-written code, you're going to encounter new bugs. Guaranteed.
- ravi-delia 4y agoAnd as always when this comes up, Rust is currently slated to be used for new development. Even putting aside the safety aspect, Rust has a lot of nice high level language features without too much overhead.
- atoav 4y agoIf the code is only battle tested you have a problem. If you did the correct thing and have written the actual tests for each of the lessons learned nothing stops you from porting these over to Rust. If you don't have the tests you just listed another reason why using a language with better safety guarantees that will not let broken things compile is a good idea. The way I see it even battle tested old code can become a liability, if it's surrounding and dependencies change.
- hn_go_brrrrr 4y agoIt's often impractical to fully test every single aspect of all code. An example that I've seen several times is bottlenecks in unexpected places. Once was due to false sharing, another due to worse standard library QoI.
- throwaway894345 4y agoThere’s some merit to “replacing battle tested code with new code”, but (1) a straight port can significantly mitigate these risks and (2) the parent explicitly compared “poorly-written Rust” with “expertly-written C”, so I think your steelman is far too charitable (I’m all for charitable interpretation but the charitable interpretation must bear some semblance to the original).
- hn_go_brrrrr 4y agoI agree with you on all counts. I think the only thing I can say wrt poorly/expertly written is I haven't met very many people capable of writing top-quality Rust (most are "I've used it for a side project or two"), whereas my professional network is filled with C experts. I expect this is due to the types of jobs I work, but the point stands: if we were to try to replace C with Rust we would likely get at most "journeyman" quality.
- throwaway894345 4y agoEven if the average C developer is more expert than the average Rust developer, I don't think the kernel will be developed by an average developer of either language.