Is package.d a good idea?

rikki cattermole rikki at cattermole.co.nz
Sun Jul 1 11:39:31 UTC 2018


On 01/07/2018 11:36 PM, Yuxuan Shui wrote:
> 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.

We added it a few years ago after 10+ years of people having a module 
called 'all' which did the same exact job just without the compiler help.

So no, we should not get rid of it, because its works pretty well over 
here :)


More information about the Digitalmars-d mailing list