Re:I can't keep up with idiomatic Rust
by jfkebwjsbx on Thursday April 09, 2020 @04:25AM
(#22820731)
That is fine, but note that 2 days a year is about 1% of work time, and that time increases as the code size increases.
Moreover, in some companies you cannot simply update external dependencies without extra painful reviews.
In general, old Rust code continues to work almost completely unchanged. There have been 3 or 4 cases where I couldn't compile an ancient dependency because it was relying on something weird like a soundness bug. The fix was usually to update the dependency to the latest minor revision.
Rust 2018 fixed a few minor syntactic issues, adding the "crate" keyword for imports from the current crate, and "dyn" in front of dynamically dispatched traits. These can both be updated using 'cargo fix' in about 20 minutes. Rust 2018 modules can use Rust 2015 modules almost completely seemlessly, even when macros are involved.
Is it perfect? No. But updating older code is something I spend a day or two a year on.