News for hackers. Stuff that matters.
Re:One year of Rust by vvanders on Monday May 16, 2016 @04:41PM (#11709431)
Yup, I've got the same feeling here.

If you've spent more than a cursory time with Rust this is pretty straightforward.

You'd represent this in Java(minus move semantics, because Java has nothing like that) via:

  class IntoIter {
    public Cycle<T extends Clone> { ... }
    ...
  }
Where Clone is just an interface that knows how to clone its value.
Re:One year of Rust by Lewisham on Monday May 16, 2016 @05:11PM (#11709659)
Fair enough; some more noodling over the signature made it a bit more obvious than it seemed banged out at the back of an OSCON presentation.

I think the point still holds. Maybe just not for that one.

Re:One year of Rust by vvanders on Monday May 16, 2016 @05:21PM (#11709725)
The thing is what you linked is the docs of an implementation not the interface.

I guess I've just had a different experience. I come from almost no PL/ML background and I've found the Iterator interface in Rust(along with Option/Result) to be some of the most impressive, clear things about the language.