On Sun, Oct 20, 2013 at 7:31 PM, Gábor Lehel <illiss...@gmail.com> wrote:
> On Sun, Oct 20, 2013 at 5:11 PM, Marijn Haverbeke <mari...@gmail.com>wrote: > >> Another problem with this proposal seems that it does away with the >> possibility of explicitly grouping a bunch of methods that make up the >> implementation of an interface. Implementing interfaces go-style, by >> just happening to have implemented all the methods that make up the >> interface, seems inappropriate for a language where interfaces aren't >> structural. >> > > No, I completely agree with you here. Traits are awesome and if anyone > wants to remove them, I will fight them with forks. The only difference in > my proposal is how their methods would be scoped: they would be under the > enclosing module, rather than the trait itself being a kind of module. > Basically the Haskell model. (Except Haskell's module system is weaker than > Rust's.) > Sorry, I think I might have misread the question, which I now believe was not about traits, but about impls. Basically, only anonymous `impl`s would go away. Trait impls would stay. But trait impls wouldn't have an effect on scoping. (Trait methods would be scoped under the module enclosing the trait, `impl`s would only affect for which types there exists an implementation for them. You can' t currently choose whether or not to export or import a trait impl, and you would continue to not be able to do that.) -- Your ship was destroyed in a monadic eruption.
_______________________________________________ Rust-dev mailing list Rust-dev@mozilla.org https://mail.mozilla.org/listinfo/rust-dev