What are modules for?

Simen kjaeraas simen.kjaras at gmail.com
Fri Nov 26 00:44:03 PST 2010


Jonathan M Davis <jmdavisProg at gmx.com> wrote:
> You can, create .di files which have function declarations
> leaving the definitions in a .d file (  
> http://www.digitalmars.com/d/2.0/dmd-
> linux.html#interface_files ), but those are specific to dmd (as opposed  
> to the D
> language)

This is false. .di files are simply .d files with a different extension.
Any compiler that supports the compilation of .d files will support .di
files (granted, it may only look for .d files).


> And I'm
> not sure that those work very well with templates, since you need the  
> whole
> template definition when instantiating a template, and templates are  
> typically
> very heavily used in D.

Template definitions are left in the .di file.

-- 
Simen


More information about the Digitalmars-d mailing list