Is package.d a good idea?

Yuxuan Shui yshuiv7 at gmail.com
Sun Jul 1 11:36:51 UTC 2018


In Rust, they have something call mod.rs, which is very similar 
to package.d. When you use a module 'foo' in Rust, it can either 
be 'foo.rs' or 'foo/mod.rs'. If 'foo' has sub-modules, it has to 
be 'foo/mod.rs'.

Now in the Rust 2018 edition, they are getting rid of mod.rs. So 
when you import 'foo', rustc will always look for 'foo.rs', and 
if 'foo' has submodules, it can still reside in 
'foo/submodule.rs'.

This makes me think if package.d is a good idea, and if we should 
try to get rid of it as well.


More information about the Digitalmars-d mailing list