Closed adamnemecek closed 4 years ago
Hey, thanks!
I personally prefer not having mod
files. Is there any good reason to switch?
In any case, there are some other nice changes here, so if you can rollback just the mod
part we should be able to merge this.
I used to be against mod too but then I realized it gives a better structure to the modules.
Could you elaborate? It sounds a bit subjective. I personally prefer to use Rust 2018 to its full extent.
Mod gives you consistency. It's a good idea for the same reason as calling your constructor method new is a good idea. If one has a type Thing, one could call the constructor "fn thing" however calling it "fn new" gives you consistency.
Mod gives you consistency.
Although, not using mod.rs
files would also give you consistency. I'm not sure what style I prefer but I don't think consistency is enough of an argument for something subjective like this.
Using mod.rs
makes it much more difficult to navigate the code base, I definitely prefer the current approach.
Do you go by the tab name or something?
No, when I do a fuzzy search, it's much easier to find something by name rather than have a bunch of different results for mod.rs
.
I really don't see any benefit to using mod.rs
since as @twe4ked put it, not using mod.rs
is also very consistent and well within idiomatic Rust. Having said that, these things are completely subjective and I wanted vote on not having mod.rs
, but if @hecrj wants to go with that I don't really mind it much. I am not actively working on this library and when I do, it is not that big of a deal.
You don't spend much time in mod files. It makes sense to hide them then.
renderer mod.rs