On Thursday, 1 October 2015 at 01:41:22 UTC, Jan Johansson wrote:
Thanks Jeremy,
Do you spot a weakness in your proposed code snip? The
declaration for interface is done in two separate files, both
test.d and test.di. Scattered declarations has never been a
good idea. I know that I can ask the DMD to do declaration
files for me, but the use case for that is to speed up building
of executable.
But is it that the separation of declaration and implementation
was never the intention in the design of D?
//Jan
Having the declarations in both files is the point though.
If you notice, the only difference between my test.d and test.di
files is that test.di is only the declarations. The speed
increase for compiling happens because of this. You still need
all declarations to be there when you build, or at least the ones
you use.
You build the library with test.d and then build using test.di
when you use the library. You never use both test.d and test.di
together. Double check my build commands.