Is the use of .di depreceated ?

James Miller james at aatch.net
Mon Apr 23 20:18:41 PDT 2012


On Tuesday, 24 April 2012 at 01:51:54 UTC, Adam Wilson wrote:
> Where DI files come in handy is for commercial libraries that 
> don't want to hand out their source, without DI's that's 
> impossible, therefore for D to be a commercially acceptable 
> language, DI's must work, unfortunately, DI's do not 
> auto-generate to the this requirement right now, I have a patch 
> to fix that. But if you are OSS, you don't really care, just 
> deliver the source as the "library".

DI files are sufficiently auto generated now. Templated functions 
have to be part of the source code because, well, *they're 
templates* the compiler needs the source code. Otherwise .di 
files are just .d files with a different name, you can do forward 
declarations for defining the interface with a library, I've used 
it several times.

There is a build tool that will generate the interface files and 
use those when actually compiling in order to speed up 
compilation times when doing incremental compilation (don't have 
to parse as much code).

--
James Miller


More information about the Digitalmars-d mailing list