[Issue 3819] New: [module system] Tiding up the imports

d-bugmail at puremagic.com d-bugmail at puremagic.com
Thu Feb 18 10:24:07 PST 2010


http://d.puremagic.com/issues/show_bug.cgi?id=3819

           Summary: [module system] Tiding up the imports
           Product: D
           Version: 2.040
          Platform: All
        OS/Version: Windows
            Status: NEW
          Severity: enhancement
          Priority: P2
         Component: DMD
        AssignedTo: nobody at puremagic.com
        ReportedBy: bearophile_hugs at eml.cc


--- Comment #0 from bearophile_hugs at eml.cc 2010-02-18 10:24:06 PST ---
import std.stdio;
void main() {
    std.stdio.writefn(1);
    writefln(2); // (A)
}

This program has to raise a compilation error at the line (A), because this
line:
import std.stdio;
Has to import only the 'std.stdio' name in the current namespace.

To import (discouraged practice) all names from a module a specific syntax may
be invented, like:

import std.stdio.*;
void main() {
    writefln(1);
    std.stdio.writefn(2); // (B)
}

That imports all the names but not the module name itself, so the line (B) has
to raise an error.

-- 
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