4 ms·
> Why couldn't There may be possible ways of doing this, but you're approaching this from the wrong angle. Right now, this is not possible, due to policy. This
by steveklabnik 7y ago
> Why couldn't
There may be possible ways of doing this, but you're approaching this from the wrong angle. Right now, this is not possible, due to policy. This policy is informed by the technical restrictions right now. There may be possible ways in the future to handle this, but as of right now, there are not.
The reason this is true right now is that there is one copy of the standard library for every program. So it needs to support all editions, because code from multiple editions may call standard library functions.
If we had multiple copies of the standard library, you may end up with issues where two different programs can't interoperate because they'd be using different versions of the same crate, and given that one of the most important features of the standard library is interoperation, this is a huge drawback for the stdlib specifically.
(There may be other technical issues, I am not an expert here, but that's the biggest hurdle as far as I know.)
- littlestymaar 7y agoThis isn't the answer I wanted, but it's a good answer. Thank you
- steveklabnik 7y agoYou’re welcome. (I imagine that you’d get the same version conflict situation with your idea btw: std::2018::Option is not the same type as std::2021::Option.)
- littlestymaar 7y agoEven if std::2018 is just doing: `pub use std::2021::Option`?
- steveklabnik 7y agoEhh you're right, actually. I still think you run into other issues, though.