Library inheritance

Chris Williams via Digitalmars-d digitalmars-d at puremagic.com
Wed Nov 5 16:29:58 PST 2014


On Tuesday, 4 November 2014 at 15:03:08 UTC, Felix wrote:
> Hi,
> just wondering if it's possible, due to the lag of header 
> files, to inherit from some class that exists within a library, 
> that has been written in D?
>
> How did you solve that?
>
> Thanks in advance.

You can run the compiler to create library and header (.di) 
files. Anything that requires compile-time execution, like 
templates, will remain in the .di. Anything that can be compiled 
as-is, will go in the library and just be represented as a 
function/method declaration in the .di file.

So, basically, the same as C++ except you don't have to manually 
write your own header files.


More information about the Digitalmars-d mailing list