News for hackers. Stuff that matters.
Re:Monads and GATs in Nightly Rust by vips7L on Saturday December 12, 2020 @09:51AM (#25398549)
The thing I found confusing with traits and their generic system was the choice to include "associative types" for out types instead of also defining them in a generic bound:

    trait Iterator {
        type Out;

        fn next() -> Option<Out>;
    }
vs

    trait Iterator<T> {
        fn next() -> Option<T>;
    }
Multiple ways to do something has made it harder to understand.

There are no comments on this comment yet.