On 02/20/2013 01:15 AM, Sanghyeon Seo wrote:
rustc.rc has:

#[path = "metadata/mod.rs"]
pub mod metadata;
#[path = "driver/mod.rs"]
pub mod driver;

I think this should be the default. "mod" is a keyword anyway.
What do you think?


Because sometimes `mod driver;` means look in the current directory, and sometimes it means look in a subdirectory, doing this would require that, when the parser sees `pub mod driver;`:

1) look in the current directory for `driver.rs`
2) if that fails, look in the `driver` directory for `mod.rs`

That's not necessarily bad, but it's a small bit of non-obvious behavior. I haven't been thrilled with the `mod.rs` convention (because my emacs buffers all have the same name) so I haven't been using it on new code, but I think if we go with the `lib.rs`/`bin.rs`/`pkg.rs` naming for crates in packages, then we should also settle on `mod.rs` for directory modules, in which case I think I'm fine with this change.
_______________________________________________
Rust-dev mailing list
[email protected]
https://mail.mozilla.org/listinfo/rust-dev

Reply via email to