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]

Repeated inheritance


Hi,

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.

Imagine we have mod2' that does the same as mod1 (renames thisname to
thatname2) and we create a module mod12'' that uses both mod2' and mod1'.
In this module, when we (set! thatname1 12), thatname2 now has also the
value 12. This seams logically but it isn't. 

Does anybody know how this problem is handled in other module systems?
I think in the case of repeated inheritance it is better to copy the value
to a new location. Yet another problem, is it always possible to detect 
repeated inheritance? Or should the value always be copied to a new location?


Jost