| I don't want to start this discussion thread yet again, but I am a firm believer that edition system only appears to work right now because: 1 - Rust is still quite young and doesn't have 30 years of accumulated editions 2 - There is still only one major Rust compiler 3 - Editions are designed only to work when compiling the whole project, including 3rd party dependencies, from source code within a single build 4 - So far the editions don't have semantic breaking changes across editions, where behaviour changes across the edition border 5 - There is no plan to ever have editions work across ABIs So "The edition system keeps old stuff working without any effort." might not be true when Rust achieves an adoption scale similar to C and C++, in about 20 years, with several accumulated editions, and a couple of compilers in use. I might be proven wrong, but that is how I see it today. |
Rust 1.0 was six years ago. When do we start the clock on six years of C++ evolving while also having "old stuff working without any effort" ?
C++ 98 to C++ 03 was five years, and that introduces almost no features at all. C++ 11 was eight years later but it's notoriously incompatible to prior versions of C++. C++ 14 is only three years, C++ 17 has breaking changes, as does C++ 20...
I think C++ 20 should have taken Epochs (yes even at considerable cost to other new features like Concepts) for this reason. I think ten years from now even if Rust has found it can't achieve everything it wants to via editions, this feature will be generally considered to be a good idea, like generics or string literals. Something you need a specific rationale for not including in your general purpose language.
I might be proven wrong too about how far this can go, but I feel like the Rust 2018 and 2021 editions already prove the value of the idea.