On Tue, Oct 26, 2010 at 4:30 PM, Jonathan S. Shapiro <[email protected]> wrote: > On Tue, Oct 26, 2010 at 1:24 PM, Matt Rice <[email protected]> wrote: >> >> thus: if 'interface bar' upon import would append the imported >> interface to the path to the file imported with slashes turned to >> dots. > > I feel like I'm being very dense, but I can't work out what you are trying > to describe. I don't understand what you mean by "upon import append the > imported interface to the path to the file imported.."
sorry, everything gets stuck in the mud when I try to english it. > It almost sounds as if you are advocating a relative import mechanism. Is > that the case? no not advocating it, because I think it causes problems I was just trying it but actually prefer a single uniform import process across all compiler switches. but i came to this realization late. with the current mechanism, the author of the code has sole responsibility for deciding the relative depth the import should be used at and that makes sense to me. > Try describing it in detailed steps. What is the path at the beginning, what > import statement is given, what interface (fully qualified name) in what > file is imported? What is the proposed impact on the path of that import? 2 files: ./test.bitc: (compiled with -I.) import test_interface.bad_interface ./test_interface/bad_interface.bitc interface bad_interface I was wondering if in test.bitc would be normalized to import 'test_interface.bad_interface' even though the developer of 'bad_interface' specified an interface name of 'bad_interface'. such that: ./test2.bitc: (compiled with -Itest_interface/) import bad_interface ./test_interface/bad_interface.bitc interface bad_interface would work also the proposed impact, good and bad a) don't have to change the interface if you change the leading directory name, just the imports. b) -Itest_interface/ import bad_interface would work as well as -I. import test_interface.bad_interface the potential problems created by it: if person A uses -Itest_interface and import bad_interface installs into some_dir/include/ rather than some_dir/include/test_interface person B who always does -Isome_dir/include and import test_interface.bad_interface can't work without changing their code, and person A probably won't even know they've broken it. _______________________________________________ bitc-dev mailing list [email protected] http://www.coyotos.org/mailman/listinfo/bitc-dev
