3 ms·
There's a 3rd option between "break the world" and "keep everything the same forever". Look into rust's editions. Short version: any compilation unit[1] can de
by sophacles 4y ago
There's a 3rd option between "break the world" and "keep everything the same forever".
Look into rust's editions. Short version: any compilation unit[1] can declare which edition it is written for. The code in that unit must be valid under the rules of the edition, but different units with different editions can be compiled into a larger program.
https://doc.rust-lang.org/edition-guide/editions/index.html https://doc.rust-lang.org/edition-guide/editions/index.html
[1] the compilation unit in rust is a crate. That doesn't mean it has to be put into crates.io, just that it has to be cordoned with its own Cargo.toml and any non-public structs/functions/etc will not be accessible from outside the crate.
- snovv_crash 4y agoThis is, of course, due to the fact that Rust doesn't have a language specification, just a compiler implementation. If an old version of the compiler has a bug, using an old edition will still have that bug. Contrast this with C++, using an old feature you can still benefit from the latest bugfixes, optimisations, target architectures and instruction sets. With the new GCC Rust work I believe a new solution will need to be found, and it will end up more similar to the situation with C++.