r/programming • • Nov 25 '21

Writing a Linux-compatible kernel in Rust

https://seiya.me/writing-linux-clone-in-rust
96 Upvotes

84 comments sorted by

View all comments

Show parent comments

2

u/ResidentTroll80085 Nov 26 '21

I work on a large commercial c/c++ codebase as well, and we have code reviews in place, as well as unit tests, to validate all code and behavior. As long as your code base isn’t the Wild West then you are fine…there is nothing dangerous about C or C++ by itself, just in how an engineer uses it.

3

u/Dean_Roddey Nov 26 '21

And I guarantee you have latent memory issues in your code base if it's large and been around a good while. It's practically impossible not to. C++, even with the addition of various analyzers and with all the code reviews and good intentions you want, once it gets large and complex enough, you cannot even really come close to proving you don't have memory issues.

At least with Rust you can get that certainty up very close to 100%.

1

u/ResidentTroll80085 Nov 26 '21

It’s really not, our code base is just fine because we know how to manage memory.