Grouped named import
Quirin Schroll
qs.il.paperinik at gmail.com
Mon Jul 22 12:29:24 UTC 2024
On Monday, 22 July 2024 at 12:06:52 UTC, Quirin Schroll wrote:
> On Monday, 22 July 2024 at 11:23:51 UTC, ryuukk_ wrote:
>> Saw this somewhere, and to be honest, that's something i
>> always wanted to be able to do
>>
>> That may be something i could try to implement, sounds
>> relatively easy
>>
>> ```D
>> import c = sqlite3, miniz;
>> ```
>>
>>
>> https://dlang.org/spec/module.html#renamed_imports
>
> Is it equivalent to this?
> ```d
> import c = sqlite3;
> import miniz;
> ```
>
> If yes, this requires no DIP. But honestly, the reason why D
> requires separate import statements for renaming stuff is that
> it’s much clearer.
I just realized one can do this:
```d
import x = std.stdio;
import x = std.file;
```
If that is intended, it’s especially important for clarity that
separate import statements are required.
More information about the dip.ideas
mailing list