This is the mail archive of the guile@cygnus.com mailing list for the guile project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
>chris.bitmead@misys.com.au writes: >> >> Maybe we also need a way to give the user of the module the power to decid >> e >> what they want to call it. >> Like, let's say for the sake of argument we find two modules with the name >> "math". Maybe the user >> could name them for their own use... >> (import-module "/usr/local/src/math.scm" as "mymath") >> (import-module "/usr/src/math.scm" as "special-math") >> >> It seems to allow you to guarantee uniqueness without a central authority. >> > >Actually, this in effect guarantees uniqueness by naming the module >according to its full path in the filesystem. I don't think that is a >good plan, it would make it impossible to write code that works on >more than one system this way. Well maybe a bit more design thought would avoid that problem. If you have two math.scm files, then rename one to mymath.scm and have some syntax like.. (import-module 'mymath as 'stat-math) (import-module 'math as 'special-math)