On Thursday, 28 July 2016 at 08:33:22 UTC, Ethan Watson wrote:
This also isn't the only use case I have. I'm a game engine programmer. We write a lot of abstracted interfaces with platform specific implementations. I know, I know, version(X){} your code, right? But that's not how everyone works. Some implementations really do require their own file for maintenance and legal purposes.

The usual idea for PAL structure is to put implementations in separate folders:
src/lin/pal/utils.d - module pal.utils;
src/win/pal/utils.d - module pal.utils;
Then you can just import pal.utils; and invoke the compiler with -Isrc/lin option.

Reply via email to