Flat module import namespace causing collisions

Artur Skawina art.08.09 at gmail.com
Thu Feb 16 05:56:30 PST 2012

On 02/16/12 14:25, James Miller wrote:
> I'm not sure if I'm reading this right... You aren't very clear...
> I think its just because putting a single `module` statement in a file
> is good practice. Its a single line and makes you think about your
> layout and structure.
> Also, there is no global namespace in D, so it must create a module
> level namespace for your file if you don't specify one. No matter what

The problem is that instead of using the fully qualified name, which is
guaranteed not to conflict with anything else, "it" chooses a simplified
one - just the basename.
Having to put a "module" statement in every module shouldn't be necessary
- flattening the namespace only saves you a few keystrokes in the rare
case when you need to explicitly access that module (because of conflicting


More information about the Digitalmars-d mailing list