[Issue 5005] New: Remove restrictions on module/package with same name.
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Wed Oct 6 13:44:57 PDT 2010
http://d.puremagic.com/issues/show_bug.cgi?id=5005
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
AssignedTo: nobody at puremagic.com
ReportedBy: ah08010-d at yahoo.com
--- Comment #0 from Austin Hastings <ah08010-d at yahoo.com> 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:
libs.myLib.package
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
interface:
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: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list