[Issue 3603] Allow selective import syntax to import several modules from a package
    d-bugmail at puremagic.com 
    d-bugmail at puremagic.com
       
    Thu Oct 24 12:17:15 UTC 2019
    
    
  
https://issues.dlang.org/show_bug.cgi?id=3603
RazvanN <razvan.nitu1305 at gmail.com> changed:
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |razvan.nitu1305 at gmail.com
         Resolution|---                         |INVALID
--- Comment #7 from RazvanN <razvan.nitu1305 at gmail.com> ---
(In reply to Leandro Lucarella from comment #0)
> Importing a lot of stuff from a deeply nested modules is very annoying
> because it needs a lot of repeating, for example:
> 
> import really.very.deeply.nested.package.module1;
> import really.very.deeply.nested.package.module2;
> import really.very.deeply.nested.package.module3;
> 
> Allowing selective import syntax to do this in a more concise way would be a
> great improvement over this, the above example could be rewritten as:
> 
> import really.very.deeply.nested.package: module1, module2, module3;
> 
> Maybe this should be semantically equivalent to this instead of the first
> example:
> 
> import module1 = really.very.deeply.nested.package;
> import module2 = really.very.deeply.nested.package;
> import module3 = really.very.deeply.nested.package;
> 
> It can be a little more consistent with selective imports. But we still have
> to same problem if we don't want to type module1.symbol and want to type
> just symbol instead.
> 
> Maybe a new syntax can be introduced to allow that, like:
> import really.very.deeply.nested.package { module1, module2, module3 };
> 
> Or something similar.
This can be trivially solved by:
import really;
Closing as INVALID
--
    
    
More information about the Digitalmars-d-bugs
mailing list