On 12/13/2013 11:43 AM, Diggory Hardy wrote:
What would you do?

Have no structure (no mod)? Or automatically create it from the file structure?

I think this is a good possibility, make the module/crate organisation mirror the filesystem (or the opposite):
* 1 module = 1 file of code
* 1 package = 1 dir
This may be limiting at times, possibility one may want multi-module files and multi-file modules. But this forms a good, simple base (anyway, we have mini & maxi modules & code files, whatever the logical & physical organisations). Another point is that very often we have package (I mean crate ;-) sub-dirs which are not packages themselves. Then, as usual, we'd have a special code file representing a package at its top dir (the same name as the package, or a magic name like 'main').

Then, module sharing is code file sharing, and package management is dir management (trivially .zip-ed or .tar.gz-ed, and then the name "package" is here for something).

Denis
_______________________________________________
Rust-dev mailing list
[email protected]
https://mail.mozilla.org/listinfo/rust-dev

Reply via email to