On Wednesday, 20 August 2014 at 09:26:37 UTC, Kagamin wrote:
On Wednesday, 20 August 2014 at 07:47:36 UTC, ketmar via Digitalmars-d-announce wrote:
but it requires to dump all 'subpackages' into one flat directory and
with ugly names.


Huh? If std.datetime and std.regex are subpackages of `std` package, it usually means, they should reside in `std` directory, no? And how explicit package protection can change that?

Your proposal makes such module layout illegal:

std.package1.module1
std.package1.module2
std.package1.subpackage.module1
std.package1.subpackage.module2

(can't have symbols in subpackage that are also available to package1 but not whole std / public, must have `subpackage_module1` instead, `package_1_subpackage_module1` if it must be available for whole std)

It severely limits expressive power of package system for code organization and encourages flat hierarchies with minimal nesting. It also looks ugly - anyone seeing module name with package name mangled in it will feel that there is something wrong with the language if it needs to resort to such hacks.
  • Fix #2529: explicit prote... Walter Bright via Digitalmars-d-announce
    • Re: Fix #2529: expli... Dicebot via Digitalmars-d-announce
      • Re: Fix #2529: e... Jonathan M Davis via Digitalmars-d-announce
      • Re: Fix #2529: e... Dicebot via Digitalmars-d-announce
      • Re: Fix #2529: e... Kagamin via Digitalmars-d-announce
        • Re: Fix #252... ketmar via Digitalmars-d-announce
        • Re: Fix #252... Kagamin via Digitalmars-d-announce
          • Re: Fix ... ketmar via Digitalmars-d-announce
          • Re: Fix ... Dicebot via Digitalmars-d-announce
            • Re:... Kagamin via Digitalmars-d-announce
              • ... Dicebot via Digitalmars-d-announce
                • ... Kagamin via Digitalmars-d-announce
                • ... Dicebot via Digitalmars-d-announce
                • ... Chris Nicholson-Sauls via Digitalmars-d-announce
                • ... Kagamin via Digitalmars-d-announce
                • ... Jacob Carlborg via Digitalmars-d-announce
                • ... Kagamin via Digitalmars-d-announce
                • ... Jacob Carlborg via Digitalmars-d-announce
                • ... Kagamin via Digitalmars-d-announce

Reply via email to