From: Barry Margolin
Subject: Re: changing a symbol name
Date: 
Message-ID: <barmar-71B5C7.19443114102004@comcast.dca.giganews.com>
In article <·······················@news.free.fr>,
 "Christophe Turle" <······@nospam.com> wrote:

> "Peter Seibel" <·····@javamonkey.com> a �crit dans le message de
> ···················@javamonkey.com...
> > "Christophe Turle" <······@nospam.com> writes:
> >
> > > "Frode Vatvedt Fjeld" <······@cs.uit.no> a �crit dans le message de
> > > ···················@vserver.cs.uit.no...
> > >> "Christophe Turle" <······@nospam.com> writes:
> > >>
> > >> > I want to change a symbol name. But it is an error to do that, why ?
> > >>
> > >> If the symbol is interned, or probably even member of any other
> > >> kind of hash-table, changing its name will lead to massive
> > >> confusion.
> > >
> > > And why ? I think the contrary. If internally all, has it should be,
> > > reference are made to the symbol, there's no problem, all is still
> > > ok.
> >
> > But you need to also be able to find the same symbol later, i.e. from
> > READ.
> 
> No. As soon as you have change the name of the symbol, this name is no more
> bound. So a read call with old-name will intern a new symbol. But a read
> with a new name will catch the wanted symbol.

No it won't, because the symbol will still be in the hash bucket 
associated with the old name.

To fix this, symbols would have to keep track of all the packages that 
they're interned in, so that they can all be rehashed after you change 
the symbol name.  This is not traditionally how packages worked, so it 
was not included in the Common Lisp specification.

-- 
Barry Margolin, ······@alum.mit.edu
Arlington, MA
*** PLEASE post questions in newsgroups, not directly to me ***

From: Pascal Costanza
Subject: Re: changing a symbol name
Date: 
Message-ID: <ckob69$12k2$1@f1node01.rhrz.uni-bonn.de>
Barry Margolin wrote:

> To fix this, symbols would have to keep track of all the packages that 
> they're interned in, so that they can all be rehashed after you change 
> the symbol name.

Including those packages that aren't currently loaded?

> This is not traditionally how packages worked, so it 
> was not included in the Common Lisp specification. 


Pascal

-- 
Pascal Costanza               University of Bonn
···············@web.de        Institute of Computer Science III
http://www.pascalcostanza.de  R�merstr. 164, D-53117 Bonn (Germany)
From: Barry Margolin
Subject: Re: changing a symbol name
Date: 
Message-ID: <barmar-69E74D.22072615102004@comcast.dca.giganews.com>
In article <·············@f1node01.rhrz.uni-bonn.de>,
 Pascal Costanza <········@web.de> wrote:

> Barry Margolin wrote:
> 
> > To fix this, symbols would have to keep track of all the packages that 
> > they're interned in, so that they can all be rehashed after you change 
> > the symbol name.
> 
> Including those packages that aren't currently loaded?

If the packages aren't yet loaded, the symbol can't be interned in them.  
If you load the package later and intern the name into it, you'll intern 
the symbol that has that name at the time you intern.

-- 
Barry Margolin, ······@alum.mit.edu
Arlington, MA
*** PLEASE post questions in newsgroups, not directly to me ***