[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Chicken-users] that module system...
From: |
Joerg F. Wittenberger |
Subject: |
Re: [Chicken-users] that module system... |
Date: |
26 Nov 2002 14:20:59 +0100 |
User-agent: |
Gnus/5.0808 (Gnus v5.8.8) XEmacs/21.4 (Common Lisp) |
felix <address@hidden> writes:
> Joerg F. Wittenberger wrote:
> > felix <address@hidden> writes:
> >
>
> >>Peter Keller wrote:
> >>
> >>>My point of view is this, screw modules. :)
> >>
> >>Absolutely! In fact I never use them. Some naming-discipline and
> >>controlled exports of names (really as in C) is more than enough
> > Agreed. But was very handy if I could rename things when I import
> > them! (Or did I miss that feature?)
>
> A nice idea, actually. But exporting toplevel bindings from
> a compiled file really just means that the symbol table
> contains bindings for that values. Non-exported (hidden)
> bindings have the value-cells in the literal-frame
> (the local vector of constants used in that file), and
> are not accessible outside. To rename the values on import
> would mean to add a new toplevel binding (in the symbol table)
right, to spell out clearly, "renaming import" should create just
_one_ binding in the symbol table where the binding is imported with
the name given in the rename process. The binding in the exporting
module should be left untouched.
> that contains the value of the imported symbol. That would
> still leave the original binding, but we would have a copy
> in another symbol. So if subsequently loaded/used files/modules
> need access to the original exported name, we may not
> overwrite it.
/Jörg
--
The worst of harm may often result from the best of intentions.