[rust-dev] Modules and visibility

Matthias Einwag matthias.einwag at googlemail.com
Thu Jan 23 15:28:07 PST 2014



with similar engineering reasons I can argue the same way that splitting
into multiple makes sense:

1.       When you name the file like our object you can use jump to file as
a replacement for a Jump to Definition in more complex IDEs.

2.       When you layout your folders like the module structure is and the
files therin like the types it is quite easy to find the actual file that
defines something.

3.       When you have multiple  types in your module you can use multiple
windows in your editor to work on both in parallel. This is not necessarily
supported if you want two views  into the same file at different positions.


Propably it's also a matter of taste. Some people like big source files.
Others (like me) don't like them. 

In several projects or even languages (Java) it's convention to break
everything down in small parts.

It shouldn't be too hard to satisfy everyone here I think . This doesn't ask
for really big and incompatible changes to the module system. Only for the
option to get rid of the file -> module condition.


PS: Sorry that we now have 2 discussions. One on Github and this one. I sent
it a little bit earlier before seeing the other one. However my intent is
really more the file and privacy thing than discussing about the whole mod
xyz and use:: functionality. 


Best regards


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/rust-dev/attachments/20140124/d6858b1a/attachment.html>

More information about the Rust-dev mailing list