July 23

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

import c = sqlite3, miniz;

https://dlang.org/spec/module.html#renamed_imports

Now that I understand what you mean, I suggest the following syntax:

import c { sqlite3, miniz }

Essentially, you propose an import construct that creates a namespace. If you want a suggestion for the DIP name: Import Namespaces

Honestly, I like this.

It’s essentially equivalent to creating a module named c and public importing all the symbols listed in the braces. (Maybe this doesn’t require a DIP, I don’t know.)

1 2
Next ›   Last »