top ten most regrettable impls:
1. impl<T> From<T> for <T>
2. impl<T> Default for [T; 0]
3. impl<A: Step> Iterator for Range<A>
4. impl<T> Move for T
5. ??????
top ten most regrettable impls:
1. impl<T> From<T> for <T>
2. impl<T> Default for [T; 0]
3. impl<A: Step> Iterator for Range<A>
4. impl<T> Move for T
5. ??????
@aDot Why is #1 regrettable?
I can see #2 being awkward if you're doing const generics maybe though I never tried it?
#3 is awkward because of the in-place mutation, I think?
#4 isn't a trait, but I think you're referring to the whole Pin/Unpin shitshow?
@laund @kroltan @aDot Huh, I always thought that From/Into being two separate traits (as opposed to just different functions in the same trait) was specifically to work around the orphan rule. That is, user code should generally impl From and use Into, which is slightly annoying to have to remember but also means we get to have both blanket (in std) and user-provided impls.
But maybe I'm wrong?
@aDot AsRef is also constraining, because adding new impls to std usually would break someone's code with inference failures.
https://github.com/rust-lang/rust/issues/139429#issuecomment-4144622172