
Hi Iavor,
i like this, as i've wanted something like this, and it also seems simple, although i may be missing something. if i download a package, i simply put it on my system somewhere, and add this place to the compiler search path (via a flag, or a compiler configuration flag). then we can have relative and absolute imports: absolute imports would be searched for in the compiler search path, while absolute imports will be searched for in the same directory as the importing module. alternatively one could only have one kind of import, that is always searched for in the compiler path. if i want to use one version of a library or another, i simply need to adjust the path when i compile my program. thus "import A.B" would mean i want module B that is in a subdirectory A of one of the directories in the path. ambiguous imports should be reported as errors.
Since this whole topic is rather hard to think about (I constantly find myself thinking in circles, anyway), could I ask you to elaborate on the scheme you had in mind? - what do you write in the source? are any syntax extensions required? - module header - import declarations - what is the compiler's strategy for finding imports? Is it the same for source files and interface/object files? - what is distributed with a library (a) in source form, (b) in binary form? - can a compiler produce objects/interfaces that are not fixed to a particular absolute module name in the hierarchy? (i.e. so that we can do binary distributions of libraries that aren't tied to particular absolute module names). - is it possible to have modules that reside at several places in the hierarchy simultaneously? Cheers, Simon

Since this whole topic is rather hard to think about (I constantly find myself thinking in circles, anyway), could I ask you to elaborate on the scheme you had in mind? same here :-) ergh, now that i understand your proposal better this is
hi, Simon Marlow wrote: probably not very relevant. i was thinking that there is no essential difference between the issue of unique module names, and unique package names, as one can always make the package name part of the module name. however, simon pj pointed out (and i agree) that the package name may be quite ugly (i.e. include versioning etc) and it would be nicer if they are not visibale in source code. bye iavor -- ================================================== | Iavor S. Diatchki, Ph.D. student | | Department of Computer Science and Engineering | | School of OGI at OHSU | | http://www.cse.ogi.edu/~diatchki | ==================================================
participants (2)
-
Iavor Diatchki
-
Simon Marlow