January 06, 2019 [Issue 12314] Allow Duplicate Renamed Imports | ||||
|---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=12314 Nick Treleaven <nick@geany.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |nick@geany.org --- Comment #7 from Nick Treleaven <nick@geany.org> --- This could be implemented with a struct template: alias gtk = MergeImports!"gtk.Application, gtk.Window"; The struct would expose the listed modules' members as aliased struct members. I think this should be closed as WONTFIX, because it adds complexity for the user when analysing modules for a case which might not be common enough, and can be done as above. -- | ||||
August 22, 2022 [Issue 12314] Allow Duplicate Renamed Imports | ||||
|---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=12314 RazvanN <razvan.nitu1305@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED CC| |razvan.nitu1305@gmail.com Resolution|--- |WONTFIX --- Comment #8 from RazvanN <razvan.nitu1305@gmail.com> --- I don't really see any benefit in allowing this sort of behavior. If you have only 2-3 modules that you are importing you can either just put those imports top-level or just use them selectively inside the functions that require them. I think that D already provides plenty of options for such scenarios, therefore it is not needed to further complicate the language implementation to allow such a narrow use case. If needed, the workaround presented by Nick is applicable. -- | ||||
Copyright © 1999-2021 by the D Language Foundation
Permalink
Reply