Generating unique identifiers at compile time

bauss jj_1337 at live.dk
Fri Jun 10 06:17:54 UTC 2022


On Thursday, 9 June 2022 at 23:50:10 UTC, user1234 wrote:
> 
> There's [been attempts] to expose it, exactly so that users can 
> generate unique names, but that did not found its path in the 
> compiler.
>
> [been attempts]: https://github.com/dlang/dmd/pull/10131

You can generate unique names actually by using CTFE RNG, so it's 
not really necessary to have it exposed to achieve that.

See my hacky example of hidden class members here:

https://forum.dlang.org/thread/siczwzlbpikwlevviwxt@forum.dlang.org


More information about the Digitalmars-d-learn mailing list