News for hackers. Stuff that matters.
Re:My least favorite Rust type by Ygg2 on Monday September 21, 2020 @06:57PM (#24549304)
Sure. But to solve those idiosyncrasies, you need to abandon backwards compatibility or introduce conflicting syntax.
Re:My least favorite Rust type by thayne on Monday September 21, 2020 @10:37PM (#24550345)
Not necessarily. A new type could be introduced and the old one deprecated.

Even without introducing a new type, it could be improved in a backwards compatible way. For example, derive the Copy trait, and add a contains method that takes an owned value instead of a reference (at least as long as the Idx type is Copy).

Re:My least favorite Rust type by Ygg2 on Tuesday September 22, 2020 @02:27AM (#24551511)
Pretty sure they discussed this change on Reddit (https://www.reddit.com/r/rust/comments/ix751t/my_least_favor...):

Here is the discussion

      >  In 2021 edition the compiler team could change the 
      meaning of (3..5) to resolve to a new type. Then if you wanted
      the old type you have to request it by a fully qualified name 
      or something.
And the responses was:

      > That would be pretty awful. I think it would be 
      better to change IntoIterator and warn for differences 
      in copy and intoiterator in both editions so you can write portable code.