On Sun, Oct 20, 2013 at 5:11 PM, Marijn Haverbeke <[email protected]> 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.) So I very much agree with Patrick. Some aspects of this proposal are > attractive, but it breaks some essential properties of the way methods > currently work (and probably can't be adjusted to work around that > without losing most of it attraction). > The main cost would be having to import methods explicitly (or using a glob), as Patrick notes. -- Your ship was destroyed in a monadic eruption.
_______________________________________________ Rust-dev mailing list [email protected] https://mail.mozilla.org/listinfo/rust-dev
