5 ms·
> The module system is explicit - there’s no 1:1 mapping with file system From the examples, it seems like there is exactly a 1:1 mapping with the file system,
by danellis 6y ago
> The module system is explicit - there’s no 1:1 mapping with file system
From the examples, it seems like there is exactly a 1:1 mapping with the file system, and it's only the visibility of that mapping that is changed by the `mod` keyword. Am I missing something?
> We declare a file as module in its parent, not in itself
So I need to declare the `models` module in `main.rs`, even though it's only used by the `routes` module and not `main.rs` itself? To me, that seems like it's breaking modularity.