ImportC: On the issue of using a type from two different C files

Mike Parker aldacron at gmail.com
Sat Aug 27 03:07:25 UTC 2022


On Saturday, 27 August 2022 at 02:34:39 UTC, TheGag96 wrote:


>
> What do you think?

This has been discussed a couple of times in our Foundation 
meetings. The most recent was in May. See Walter's section in the 
sumamry:

https://forum.dlang.org/thread/uhgndrcnekedjqtarnwl@forum.dlang.org

Iain suggested the following:

> ImportC symbols, rather than going into a module space, should 
> go into a global ImportC module. Each imported C file or header 
> file is then appended to that module.

Martin disagreed, and proposed an alternative:

> Martin said that one problem with that approach is that a D 
> module would have access to symbols it didn't import. He 
> suggested the ideal solution would be for each header to have 
> its own module that doesn't change from one invocation of the 
> compiler to the next.





More information about the Digitalmars-d mailing list