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

Stefan Koch uplink.coder at googlemail.com
Mon Feb 25 12:33:48 UTC 2019


On Monday, 25 February 2019 at 10:20:34 UTC, Jacob Carlborg wrote:
> On 2019-02-25 02:04, Manu wrote:
>
>> Why wouldn't you do it in the same pass as the .di output?
>
> * Separation of concerns
> * Simplifying the compiler ("simplifying" is not the correct 
> description, rather avoid making the compiler more complex)
>
> I think the .di generation should be a separate tool as well.

I don't think so.

h and .di generation have to be in sync with the AST.
The easiest way to guarantee that it is is by having it in the 
compiler test-suite.
Therefore it should be part of the main compiler.
Also it removes the need of having to add another application to 
your build.



More information about the Digitalmars-d mailing list