4 ms·
IMO it’s not opinionated enough. Golang for example doesn’t let you customize go fmt, while Rust does. Rust also has many ways to do things in general (mod.rs v
by baby 3y ago
IMO it’s not opinionated enough. Golang for example doesn’t let you customize go fmt, while Rust does. Rust also has many ways to do things in general (mod.rs vs name_of_folder.rs for example) and seems to not want to provide a useful baseline for most projects via its standard library (unlike Golang).
But to go back to our subject: Rust is a great language and that’s all you need. I wish I could use it with unity.
- tick_tock_tick 3y agoThe mod vs folder rs stuff is just embarrassing for Rust. I have no idea why they support more then 1 method.
- metaltyphoon 3y agoThe do it because the first one sucked ass and the second is a huge improvement but you still have to support the old way.
- sullyj3 3y agoWhich is which and why?
- metaltyphoon 3y agomod.rs came first and that made creating modules verbose as hell. Not only that but imagine having many mod.rs files open, you wouldn’t know what module you are in by just looking at the filename.
- baby 3y agoimagine having many lib.rs open?
- baby 3y agomod.rs is better, change my mind
- metaltyphoon 3y agoSure, open 5 tabs named mod.rs, so which mod are you in?
- baby 3y agoOpen 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 3y agoYes 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 2y agoI’ve worked in plenty of codebases that were split in many crates, not many folder modules
- 0x457 3y agoI speculate that they wanted to support just `mod.rs`, but because VS Code became the editor for rust people hated seeing all tabs named `mod.rs`.
- eYrKEC2 3y agoGolang is indeed much more opinionated. To quote @bcantril, "Go is like steampunk for programming."