June 22, 2020 Nested imports - y/n | ||||
---|---|---|---|---|
| ||||
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. |
June 22, 2020 Re: Nested imports - y/n | ||||
---|---|---|---|---|
| ||||
Posted in reply to adnan338 | 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.
|
Copyright © 1999-2021 by the D Language Foundation