On 9 March 2018 at 10:44, Jonathan via Digitalmars-d <digitalmars-d@puremagic.com> wrote: > D kinda lacks a way of creating a module/namespace inside another file. > > D does have modules but they have to be in separate files. (Though separate > files may be better coding practice, why is it D's job to tell me how to > code.) > > I think a simple way to do this with existing syntax is to add functionality > for `module` to be used as a block. > > > module modulename { > void fun(){} > } > modulename.fun(); > > > An inline module.
If you tried to `import modulename;` from some other module... how would the compiler know where to find it?