Can you eli5 why
TryFrom
andTryInto
matters, and why it's been stuck for so long ? (the RFC seems to be 3 years old)If you stabilise
Try{From,Into}
, you also want implementations of the types instd
. So you want things likeimpl TryFrom<u8> for u16
. But that requires an error type, and that was (I believe) the problem.
u8
tou16
cannot fail, so you want the error type to be!
. Except using!
as a type isn't stable yet. So use a placeholder enum! But that means that once!
is stabilised, we've got thisInfallible
type kicking around that is redundant. So change it? But that would be breaking. So make the two isomorphic? Woah, woah, hold on there, this is starting to get crazy...*new person bursts into the room* "Hey, should
!
automatically implement all traits, or not?""Yes!" "No!" "Yes, and so should all variant-less enums!"
Everyone in the room is shouting, and the curtains spontaneously catching fire. In the corner, the person who proposed
Try{From,Into}
sits, sobbing. It was supposed to all be so simple... but this damn!
thing is just ruining everything.... That's not what happened, but it's more entertaining than just saying "many people were unsure exactly what to do about the
!
situation, which turned out to be more complicated than expected".
33 Likes