Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
baby
on April 27, 2024
|
parent
|
context
|
favorite
| on:
Leaving Rust gamedev after 3 years
mod.rs is better, change my mind
metaltyphoon
on April 27, 2024
[–]
Sure, open 5 tabs named mod.rs, so which mod are you in?
baby
on April 27, 2024
|
parent
[–]
Open 5 libs.rs, which crate are you in? Always look at full path instead of filename. A mod.rs means a much more cleaner organization, as you know that all of a folder module's content is within that module, and you don't have to look elsewhere.
metaltyphoon
on April 27, 2024
|
root
|
parent
[–]
Yes this would be a problem if for every module you had to create a lib.rs, which is not the case. mod.rs has a much higher # of occurrences.
baby
on April 30, 2024
|
root
|
parent
[–]
I’ve worked in plenty of codebases that were split in many crates, not many folder modules
Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: