Header-Only Library - pragma(root)

Ali Çehreli acehreli at yahoo.com
Sun Jun 14 09:39:52 UTC 2020


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)".

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... :)

Ali


More information about the Digitalmars-d mailing list