DIP 45 - approval discussion

Walter Bright newshound2 at digitalmars.com
Mon Nov 11 10:16:21 PST 2013


On 11/10/2013 10:02 PM, Benjamin Thaut wrote:
> Am 11.11.2013 05:04, schrieb Walter Bright:
>>
>>
>> The trouble with dllexport and dllimport is the same module is both
>> depending on how it is used - I don't think that is very viable (C/C++
>> deal with this using macros). The idea is to use export for both, and
>> then use the context to figure out if it is dllimport or dllexport.
>>
>
> Still, how do you want to stop the compiler from referencing the module infos
> without knowing the module is part of a dll?

The compiler needs to know which modules are coming from a dll.

The only reference is in the import dependency list, which is used for static 
constructor calling. A dll's initialization should be self-contained and fully 
performed upon loading of the dll. The compiler should skip adding it to the 
import dependencies.


More information about the Digitalmars-d mailing list