Hi,
There is one thing that really annoys me with the module convention.
When creating a module, you can either do
--- root
--- module
--- mod.rs
--- other.rs
or
--- root
--- module.rs
--- module
--- other.rs
but the later forces to have module.rs out of the folder. It's not that clean.
Question:
Why don't we have:
--- root
--- module
--- module.rs
--- other.rs
with rustc looking for the same name as the folder plus the rs extension? That way, everything is kept in its own folder, no need to navigate one upper level. And we get the added benefit of not having the same mod.rs name in the editors.
The decision to use module/mod.rs was made very early in the development of Rust, before the RFC era, so it might be hard to track down the decision making. I imagine the desire was to avoid having to repeat the name twice with module/module.rs.
Support for {module.rs, module/other.rs} is newer - it was added in the 2018 edition: Path and module system changes - The Rust Edition Guide to avoid requiring you to do the module.rs -> module/mod.rs rename when adding the first submodule to it.
The RFC that introduced the {module.rs, module/other.rs} change contains a list of discussions about the module system. There might be something in them you find interesting: