On Wed, 2005-06-08 at 18:03 -0400, Swaroop Sridhar wrote: > 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.
We definitely should NOT make this switch. We want to be able to support compilation environments that are not based on files. Stick with the existing syntax. The design is intentional. > 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] This is not good either. _______________________________________________ bitc-dev mailing list [email protected] http://www.coyotos.org/mailman/listinfo/bitc-dev
