Regarding: import "foo.h";

Andrej Mitrovic andrej.mitrovich at gmail.com
Wed Jul 17 16:01:33 PDT 2013


On Wednesday, 17 July 2013 at 22:52:40 UTC, Walter Bright wrote:
> Perhaps DMD could call it like it calls the linker.

But then DMD would have to act as the middle-man between the 3rd 
party tool and the header files (e.g. it would have to pass 
custom flags to the tool, there's no question how many flags 
could exist..). I don't see much benefit to it.

It also doesn't help that `import "foo.h"` does who-knows-what 
behind the scenes, for example there's the question of which 
generated D module is actually then imported, and what do the 
actual D declarations look like? The user has to know, otherwise 
he can't use the wrapper code just by looking at the foo.h header 
file.

On Wednesday, 17 July 2013 at 22:52:40 UTC, Walter Bright wrote:
> 4. the license would be the same as for the back end

Why even bother starting this thread?


More information about the Digitalmars-d mailing list