Summary: Remove restrictions on module/package with same name.
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: enhancement
          Priority: P2
         Component: DMD

--- Comment #0 from Austin Hastings <> 2010-10-06 13:44:33 
PDT ---
I've got a library, let's call it myLib. And I've declared it in the libs
namespace, so that packages are of the form:


I'd like to separate the details of the interface from the details of the
implementation by creating a module, myLib.d, that imports the whole library

module myProgram;
import libs.myLib;

But I don't want a single D source file that eleventy-seven hundred lines of
source, so I'd like my implementations to live in:

// \file: source/libs/myLib/part1.d
module libs.myLib.part1;

// \file: source/libs/myLib/part2.d
module libs.myLib.part2;

Sadly, DMD2 currently prohibits this - module ... is in multiple packages ...

Given that this seems like a pretty straightforward approach to maintaining
clean code, I was surprised this isn't already supported.

Anyway, please make it possible for a module to share a name with a package.

Configure issuemail:
------- You are receiving this mail because: -------

Reply via email to