www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 14704] New: The design, which allows not to write import,

https://issues.dlang.org/show_bug.cgi?id=14704

          Issue ID: 14704
           Summary: The design, which allows not to write import, import,
                    import ... for selective imports
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P1
         Component: dmd
          Assignee: nobody puremagic.com
          Reporter: dennis.m.ritchie mail.ru

Now we can write this:

import std.stdio : write, writeln;
import std.range : retro, repeat;

But why write several times a keyword `import`, if you can add a similar
design:

import {
    std.stdio : write, writeln;
    std.range : retro, repeat;
    // ...
}

import {
    std.stdio, std.range,
    std.array : array;
    // ...
}

Some background here:
http://forum.dlang.org/thread/lldgdawwfeehlaiedqbj forum.dlang.org
https://issues.dlang.org/show_bug.cgi?id=13855

--
Jun 16 2015