If we always import entire modules and not a single exported element [I think allowing this is a bad idea. Java does this, and has a multi-page algorithm for unambiguously resolving something like a.b.c.d.e], we can change the syntax of import from

(import new_name a.b.c.d.e)

to

(import new_name "a/b/c/d/e.bitc").

The usage of exported elements would still be new_name.elem

Since our modules are just compilation units, this change will relax any hierarchical-ordering restriction between modules and files. However, it is arguable that this is not a restriction but a feature.

Also, an different approach would be to say ALL of files containing the necessary modules should be provided as the parameters at command line (libraries can be provided as objects or archives) and the compiler will not open any more files for you. If this is done, we need not force any naming bonds between modules and files, and in fact, a file can have multiple modules. [Note that I am NOT advocating nested modules]

Swaroop.
_______________________________________________
bitc-dev mailing list
[email protected]
http://www.coyotos.org/mailman/listinfo/bitc-dev

Reply via email to