Can someone explain me why the module system maps to the file system in the way
it does? The problem is that you can end up with these modules named mod.rs
instead of the more informative names. If you have the following modules:
foo
foo::lut
bar
bar::lut
...that maps to files and folders as
On Thu, Apr 17, 2014 at 05:39:15PM +0300, Tommi wrote:
...but why not map such modules to files and folders as the following:
foo.rs
foo/lut.rs
bar.rs
bar/lut.rs
...and have each module informatively named.
This used to be our system and we found it very confusing in practice.
Basically
Sublime does this automatically.
On Thu, Apr 17, 2014 at 10:56 AM, Niko Matsakis n...@alum.mit.edu wrote:
On Thu, Apr 17, 2014 at 05:39:15PM +0300, Tommi wrote:
...but why not map such modules to files and folders as the following:
foo.rs
foo/lut.rs
bar.rs
bar/lut.rs
...and
Tommi (cc'ing rust-dev)-
I don't know if this is considered an anti-pattern or not, but if you want to
structure your files in the manner you describe, you can do so without
resorting to `#[path=…]`, assuming you're willing to add a bit of boilerplate
to the foo.rs and bar.rs to pull in the
On 04/17/2014 07:39 AM, Tommi wrote:
Can someone explain me why the module system maps to the file system in the way
it does? The problem is that you can end up with these modules named mod.rs
instead of the more informative names. If you have the following modules:
foo
foo::lut
bar
bar::lut
Okay, thanks for explaining the reasoning. I think I'll conform to the standard
way of doing things.
On 2014-04-17, at 18:56, Niko Matsakis n...@alum.mit.edu wrote:
On Thu, Apr 17, 2014 at 05:39:15PM +0300, Tommi wrote:
...but why not map such modules to files and folders as the following: