On Sunday, 1 July 2018 at 11:36:51 UTC, 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.
when I started D I was really confused about just this one thing
as well! We should definitely get rid of package.d and support
just having packages along modules without that weird error
(foo.d + foo/something.d which will have modules foo and
foo.something)