Re:Rust from a Gopher – Lessons 7, 8 and 9
by ReactiveJelly on Wednesday November 18, 2020 @09:10AM
(#25136892)
It confused me for a long time because:
- Other languages like C++ and C# emphasize how much namespaces are _not_ connected to files at all
- I just ignored it and wrote everything in one big file, because the Rust compiler is just as slow either way. Even in C++ it's arguable whether splitting a file will result in faster or slower compiles, because of the outrageous behavior of #include
But once I realized every file is a module, it slowly started to make sense.
- Other languages like C++ and C# emphasize how much namespaces are _not_ connected to files at all
- I just ignored it and wrote everything in one big file, because the Rust compiler is just as slow either way. Even in C++ it's arguable whether splitting a file will result in faster or slower compiles, because of the outrageous behavior of #include
But once I realized every file is a module, it slowly started to make sense.