Regarding: import "foo.h";

Paulo Pinto pjmlp at progtools.org
Thu Jul 18 00:36:48 PDT 2013


On Thursday, 18 July 2013 at 06:35:21 UTC, Jacob Carlborg wrote:
> On 2013-07-18 01:53, Brad Roberts wrote:
>
>> 6. the time cost of parsing/semanticing c/c++ is significantly 
>> higher
>> than D, making .h importing dwarf the rest of the cost of the
>> compilation process
>>
>> 7. .h files are roughly static so translating them on each 
>> compilation
>> unit is wasteful, generate once as part of the build process 
>> and update
>> only as needed.  This is stuff that build processes are good 
>> at.
>
> Yeah, that's true. This year Clang has got support for modules. 
> Basically a better and safe(er) version of percompiled headers.

They are not there yet.

I was really looking forward for it, mostly due to the C++17 
modules effort being done at Apple.

However, what was presented at WWDC 2013 was a half baked 
solution that only works in Objective-C for system headers.

--
Paulo


More information about the Digitalmars-d mailing list