Hello Robert,

No need for a huge module, or module names mismatching file names:
----
module foo;
version (linux) import foo_linux;
version (Windows) import foo_win;
----
Sure it adds and extra file, it's a lot cleaner imo than having a huge
module with both implementations or mismatching file/module names.

I don't think that works in one case; where you are forced to use fully qualified name.

import foo;
import something.else;

bar(); // calls  something.else.bar;
foo.bar(); // IIRC this don't work

OTOH, you might be able to get around that with the following:

version (linux) { import foo_linux; alias foo_linux foo; }
version (Windows) { import foo_win; alias foo_win foo; }

(I haven't tested any of that because my systems are being shipped right now.)

--
... <IXOYE><



Reply via email to