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]

Re: Repeated inheritance



> given two modules, mod and mod', where mod defines a symbol "thisname"
> to 99.
> 
> Now mod1' uses mod and renames "thisname" to "thatname1". In other words,
> we have two obarrays, one for mod, containing the symbol "thisname", one for 
> mod', containing the symbol "thatname1", both refering to (the location of)
> 99.

What exactly do you mean when you say that a module renames a variable
it imports to another variable it exports?  Do you mean

	(define thatname1 thisname)

?  That's a copy, not a renaming.  thatname1 is a new variable whose
initial value is that of thisname.

I don't think that renaming is part of the normal module semantics.
If you do rename and re-export variables, you'll get weird aliasing
effects; I don't see any way around that.

Perhaps I've misunderstood your question?