Files.diand .didentical to the compiler. (literally, this refers to exactly the same as source D).
You can put as much or less as you want, as long as the interface is really compatible with the library code. You are responsible for synchronizing the interfaces - if you change the signature of the function in the code of the main library, you must change it (or regenerate .di from the main .d file) in the interface, the compiler will not check them for you.
I do not use files .dipersonally, I think that their only practical benefit is if you are writing a closed source library.
source
share