I don't understand betterC

confused no at no.no
Sat Sep 2 03:38:41 UTC 2023


On Friday, 1 September 2023 at 13:45:05 UTC, evilrat wrote:
> It is shadowing default implicit "import object;", here a 
> demonstration
>
> ```d
> // this example shows default implicit import of "object" module
> // compile this example:
> //   ldc2 -c test.d
> // output:
> //   tuple("object", "core", "main", "thisModule")
>
> // just a random import
> import core.stdc.stdio;
>
> void main() { }
>
> alias thisModule = __traits(parent, main);
> pragma(msg,  __traits(allMembers, thisModule)); // has 
> implicitly imported 'object' module
> ```

Is there no way for the two to coexist?


More information about the Digitalmars-d-learn mailing list