Redundancy of DRuntime and Phobos

Paul Backus snarwin at gmail.com
Fri May 21 17:24:47 UTC 2021


On Friday, 21 May 2021 at 16:15:57 UTC, Q. Schroll wrote:
> Another example is `Unconst`, `Unqual`, 
> `hasElaborate`*`Whatever`* that use a public import, but for 
> whatever reason, they encapsulate the import and make an 
> unnecessary template instance. None simply do
> ```D
> public import core.internal.traits : Unconst;
> ```
> but follow the pattern
> ```D
> template Unconst(T)
> {
>     import core.internal.traits : CoreUnconst = Unconst;
>     alias Unconst = CoreUnconst!(T);
> }
> ```
> I guess there's a good reason to do this and I'd like to 
> understand.

Probably for the documentation. Public imports don't generate 
good ddoc output.


More information about the Digitalmars-d mailing list