[rust-dev] proposal: unify module/type namespaces

Patrick Walton pwalton at mozilla.com
Thu Aug 16 15:13:41 PDT 2012


I'm tentatively in favor of this proposal. Might be a good idea to hold 
off on the dot notation switch though.

I also wonder if one should have to explicitly import trait methods as well.

To make Niko's proposal clearer: here's how one would define the MyType:

     mod foo {
         mod bar {
             struct MyType { ... }
             impl MyType {
                 fn new() -> MyType {
                     MyType { ... }
                 }
             }
         }
     }

Patrick


More information about the Rust-dev mailing list