DI File Generation

Adam Wilson flyboynw at gmail.com
Wed Dec 14 15:40:02 PST 2011


On Wed, 14 Dec 2011 15:26:05 -0800, Paulo Pinto <pjmlp at progtools.org>  
wrote:

> Am 14.12.2011 21:13, schrieb Jonathan M Davis:
>>> Also, _all_ templated _anything_ has to be put in the .di file, and a  
>>> lot of
>> stuff tends to be templated in D (especially in the standard library),  
>> so it's
>> pretty easy to need to put a large portion of your code in the .di file  
>> anyway.
>>
>
> I think that Modula-3, Eiffel and Ada don't have issues with having  
> "template" declaration in the interface part, with the definition being  
> done in the implementation part.
>
> Then again, what they support is what is more commonly known as generics.
>
> I imagine you mean that metaprogramming requires the template code to be  
> in the .di file as well, right?
>
> --
> Paulo

As a note for this discussion, when you export stuff via DI gen, it  
includes templates. In the cases of classes it wraps the class inside the  
template. My patches don't effect this template code, they work on  
members. The only potential issue I can see is that my patch would execute  
after a function level template and leave the template hanging without the  
corresponding function.

Does anyone have some test code that I can run to verify this behavior?

-- 
Adam Wilson
Project Coordinator
The Horizon Project
http://www.thehorizonproject.org/


More information about the Digitalmars-d mailing list