Header-Only Library - pragma(root)

Max Samukha maxsamukha at gmail.com
Sun Jun 14 10:14:28 UTC 2020


On Sunday, 14 June 2020 at 09:39:52 UTC, Ali Çehreli wrote:
> On 6/14/20 2:33 AM, Max Samukha wrote:
>
>> We have -i already for automatic inclusion of imported modules:
>> 
>> dmd atom -i=.
>> 
>> What does the pragma add to this?
>
> -i would mean "assume everything has pragma(auto_add)".

Yes. However, you can specify patterns as strict as matching 
single modules. Anyway, I can see the difference.

>
> Note how I could not say "root". :) Where does it come from? 
> Why root? Most programmers wouldn't understand it at all.
> "Header" wouldn't mean anything to anybody unless they are 
> coming from C or C++.
>
> And you said "automatic inclusion".
> Perhaps pragma(auto_include) but then it would confuse C and 
> C++ programmers because they "include" header files.
>
> Tough naming situation... :)

pragma(static) ))

>
> Ali




More information about the Digitalmars-d mailing list