Nested imports - y/n
Eugene Wissner
belka at caraus.de
Mon Jun 22 09:18:50 UTC 2020
On Monday, 22 June 2020 at 03:54:56 UTC, adnan338 wrote:
> Hello, has the idea of nested imports been explored yet?
> For example if you have:
>
> import gtk.Application : Application;
> import gtk.ApplicationWindow : GAW = ApplicationWindow;
> import gtk.Nested.This: Symbol;
> import gtk.Nested.That;
> import gtk.Entry;
>
>
> With nested imports you would just write something like:
>
> import gtk(
> Application: Application,
> ApplicationWindow: GAW = ApplicationWindow,
> Nested(
> This : Symbol,
> That
> ),
> Entry,
> );
>
> It would reduce some typing.
Define a module with imports and aliases you need and import this
module instead of the direct library imports.
More information about the Digitalmars-d
mailing list