|
|
|
|
|
by tialaramex
1699 days ago
|
|
> 1 - Rust is still quite young and doesn't have 30 years of accumulated editions 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. |
|
Lets say you have a noexcept function compiled in C++20 that calls a throws() function, compiled in C++03, which actually ends up throwing, linked together.
What is the runtime supposed to do now?
To which semantics does it follow now?
Call std::unexpected() as it is supposed to do pre-C++14 or call std::terminate() as it should do in C++20?
What about the user defined handler that was configured for such scenario? Which of them gets called, or do both get called, in which order?
Maybe I am doing it more complex that it is, but I see several scenarios from point of view where multiple compilers, binary libraries and semantic changes come into play, editions turn just into another way to define language versions, because they don't cover all possible uses cases how a language might evolve.
Anyway, history will tell how things work out in the end.