Header-Only Library - pragma(root)
Stefan Koch
uplink.coder at googlemail.com
Sun Jun 14 10:35:51 UTC 2020
On Sunday, 14 June 2020 at 10:24:33 UTC, Walter Bright wrote:
> On 6/14/2020 2:52 AM, Mathias LANG wrote:
>> https://github.com/dlang/dmd/pull/7099
>> It's essentially putting rdmd in the compiler because rdmd was
>> considered too slow.
>
> Thank you. I see I was involved in the discussion.
>
> The issue is then should the implementer of the module decide
> if it is header-only (i.e. pragma(root)) or the caller (-i).
>
> It would probably be better as the implementer, as a
> header-only library has to be designed for it. It also means
> the user needn't need to set the switches, he can just compile.
I agree with everything except for the name.
I same sure there are better names than root.
Perhaps extern(static) ?
Also this needs to be either restricted to leaf functions,
or draw in callees as well.
More information about the Digitalmars-d
mailing list