Creation of a Build tool on top of the D compiler

Sean Kelly sean at f4.ca
Sat Jan 27 15:19:50 PST 2007


Bill Baxter wrote:
> Sean Kelly wrote:
>> Andrey Khropov wrote:
>>> kris wrote:
>>>
>>>> Especially when you
>>>> can't successfully utilize certain types of D code from a library -- 
>>>> such as
>>>> templates.
>>>
>>> I strongly believe that compiler *should* be able to compile 
>>> templates to a
>>> some intermediate form and put it into libraries. Otherwise you will 
>>> be forced
>>> to create d 'header' files for your template-enabled libraries or 
>>> even use them
>>> as source code only.
>>
>> C++ tried this with "export" and it's been a bit of a fiasco.  Last I 
>> heard, EDG had it implemented (they were the only compiler team to 
>> have done so), and the benefit didn't seem all that great.
> 
> Crazy idea, but what if there were an object format could contain 
> something like byte-compiled templates along with real binary code.  I 
> guess it would be sort of like precompiled headers that get stuck in the 
> final library.

This is pretty much how C++ "export" works.  The files must still be 
processed at compile-time however, since the generated code may vary 
based on template parameters.

> Anyway, it would be cool if I could have all of Boost in one big 
> "library" file rather than a billion little files scattered all over the 
> place.

Agreed :-)


Sean



More information about the Digitalmars-d mailing list