News for hackers. Stuff that matters.
Re:Announcing Rust 1.0 Alpha by steveklabnik on Friday January 09, 2015 @03:12PM (#8864220)
We have them.
Re:Announcing Rust 1.0 Alpha by Gankro on Friday January 09, 2015 @04:55PM (#8864765)
Like three different kinds, too!

        // Old-style generics; monomorphized 
        // with S as an "input" type of MyTrait
        fn foo<S, T: MyTrait<S>>(elem: T) { ... }

        // Where-clause-style generics; monomorphized, 
        // with S as an "output" (associated) type of MyTrait
        fn foo<S, T>(elem: T) 
        where T: MyTrait<Thing = S> { ... }

        // Trait objects; dynamic dispatch
        fn foo(elem: Box<MyTrait>) { ... }
Re:Announcing Rust 1.0 Alpha by kimundi on Friday January 09, 2015 @08:31PM (#8865487)
Well, the first two are really just the same thing :P
Re:Announcing Rust 1.0 Alpha by Gankro on Saturday January 10, 2015 @12:53AM (#8866081)
Eh, with the new oprhan/impl rules associated and uh... not... associated(...?) types have developed quite a schism.
Re:Announcing Rust 1.0 Alpha by dbaupp on Saturday January 10, 2015 @02:31AM (#8866242)
Well, the first two confusingly change two variables at once: the things that are the same (which I presume is what kimundi meant) are

    fn foo<S, T: MyTrait<S>>(elem: T) { ... }

    fn foo<S, T>(elem: T) where T: MyTrait<S> { ... }
and

    fn foo<S, T: MyTrait<Thing = S>>(elem: T) { ... }

    fn foo<S, T>(elem: T) where T: MyTrait<Thing = S> { ... }