Make DMD emit C++ .h files same as .di files

Nicolas D nicolas at serveur.io
Mon Feb 25 00:09:48 UTC 2019


On Sunday, 24 February 2019 at 23:24:53 UTC, Manu wrote:
> I've been talking about this for years, and logged this a while 
> back: https://issues.dlang.org/show_bug.cgi?id=19579
>
> Is there anyone interested in or knows how to do this?
> It would really be super valuable; this idea would motivate
> inter-language projects that typically go 
> C++-fist-with-a-D-binding to
> work the other way.
>
> Creating a pressure to write D-code first because the binding 
> part is maintained automatically when you compile is 
> potentially significant; gets programmers thinking and writing 
> D code as first-class.
>
> Idea would be same as emitting .di files, but in this case only
> extern(C)/extern(C++) declarations would be emit to a .h file.
>
> I could use this to create some nice demos in my office which I 
> think would get a few people talking and excited.

That sounds like a cool project and it's something I'm a bit used 
to working with, I just need to get familiar with DMD's source 
and I can start working on that.


More information about the Digitalmars-d mailing list