Whoops. I mistook Import for Include.
My example should have been:
I started out attempting to use Import for a project but found a major problem. Types defined in different included modules can't refer to each other - that is B contain a reference to C and C contain a reference to B.
There are workarounds such as deriving B and C from the same parent but I found this impractical due to the large object hierarchy in my project. The other alternative is to put them in one file which leads back to what you want to avoid.
Also I was disappointed to find that project build time became much longer with Import. I had expected it to be shorter since modules are only rebuilt if necessary. However any change to a type further up the hierarchy caused every descendent to rebuild. Seemed like every build involves overhead that ends up costing more than the simpler way.
So now I just have a main file that uses Include to pull in about 20 separate files. One per type. The whole thing builds in about 5 seconds which is fast enough that it hardly matters.
My example should have been:
Include "B.bmx" Include "C.bmx"
I started out attempting to use Import for a project but found a major problem. Types defined in different included modules can't refer to each other - that is B contain a reference to C and C contain a reference to B.
There are workarounds such as deriving B and C from the same parent but I found this impractical due to the large object hierarchy in my project. The other alternative is to put them in one file which leads back to what you want to avoid.
Also I was disappointed to find that project build time became much longer with Import. I had expected it to be shorter since modules are only rebuilt if necessary. However any change to a type further up the hierarchy caused every descendent to rebuild. Seemed like every build involves overhead that ends up costing more than the simpler way.
So now I just have a main file that uses Include to pull in about 20 separate files. One per type. The whole thing builds in about 5 seconds which is fast enough that it hardly matters.