Grouped named import
ryuukk_
ryuukk.dev at gmail.com
Sat Aug 3 11:32:43 UTC 2024
On Sunday, 28 July 2024 at 18:01:43 UTC, Walter Bright wrote:
> D already has namespaces:
>
> https://dlang.org/spec/attribute.html#namespace
>
> A struct can also be used as a namespace:
>
> ```
> struct c
> {
> import sqlite3, miniz;
> }
> ```
>
> I've been using field-less structs this way myself.
Your example didn't work, i needed:
```D
struct c
{
public import sqlite3, miniz;
}
```
I never thought it would work, thanks for sharing
More information about the dip.ideas
mailing list