Hello bearophile,

BCS:

IIRC, all that does is make anything that imports you, import that as
well. It doesn't do anything to the names.

I meant to create a module named "foo" with inside:

module foo;
version (linux) public import foo_linux;
version (Windows) public import foo_win;
The module system has numerous holes (that Walter will need to take a
look at, because three of them alone cover almost 10% of all bugzilla
votes), so this is not going to work perfectly, but now if you import
foo you have available all the names inside foo_linux and foo_win.

That's exactly what I thought you were suggesting.

The problem is that, IIRC and assuming foo_linux and foo_win both contain a bar, the the following still doesn't work:

foo.bar();

what works is:

foo_linux.bar();

or

foo_win.bar();

In the case that just bar() doesn't work (say there is another bar somewhere else), you're sunk.

--
... <IXOYE><



Reply via email to