4 ms·
Rust is already popular and old enough to have terrible Enterprise Rust code bases. There are a few things working in Rust's favor: * unsafe code is used to b
by pornel 2y ago
Rust is already popular and old enough to have terrible Enterprise Rust code bases.
There are a few things working in Rust's favor:
* unsafe code is used to build safe abstractions around it, so most users don't have to write unsafe code themselves. It is easy to forbid use of unsafe blocks in your own codebase. You can flag unsafe code during code reviews, and have a policy who is allowed to write unsafe code.
* Rust leans on open-source dependencies a lot. Commonly used libraries are decent, since the community can band together to improve or replace them. This makes Rust applications mostly "glue" code, where there's less room to mess up in novel ways.
* the language allows defining strict library APIs which are harder to misuse. There's Clippy checking for common mistakes and sloppy code.
Rust already assumes that it will be written by less than prefect programmers.