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: reexport-from-module


Please excuse me for responding so late but I am very busy at the moment.


> Suppose D wants `pi' defined as 3.14, but still wants access to A's
> `pi', which it considers `exact-pi'.  Then, the sequence:
> 
> 	(define-module (A))
> 	(define-public pi 3.1415)
> 	(define-module (C) :use-module (A))
> 	(define-public exact-pi pi)
> 	(define-module (D) :use-module (C))
> 	(define pi 3.14)
> 
> would be a case of both re-export as well as renaming, and D would be
> able to use `pi' as well as `exact-pi'.  

Yes, I think it is a nice feature. But why do you use the word "renaming"?
`exact-pi' in the above example is not only a new symbol, it is also bound
to a _copy_ of pi's value.


       (set-current-module (A))
       (set! pi 100)
       (set-current-module (C))
       exact-pi -> 3.1415
       pi -> 100



Jost