[CM] Why are containers named?

Larry Troxler lt@westnet.com
Fri, 17 Jan 2003 22:03:45 -0500


Just a quick question which I admittedly have not spent a lot of time
looking into, but maybe someone has a quick answer:

What does the idea of having a name slot for containers serve, when it
seems to me that you could just set a symbol-value to a container, and
then the symbol could serve as the name?

Perhaps this is more of a general Common Lisp question (why name things
when you could set a symbol to refer to them), so apologies in advance.
Perhaps an issue of needing to have a seperate hash table for
implementation purposes?

What leads me to ask this question, is simply that it is very awkward
when interfacing to CM interactively, to type "#!" when I want to
reference a container - it is really a reach for the fingers and
destroys the momentum of the session. I have made a macro that creates a
container and gives it the same name as the symbol, but that is
redundant. It seems that I wouldn't need the seperate name slot at all,
except that the "save-object" function writes forms that create
anonymous containers (ok, not sure of the right word) that are not
assigned (again, not sure - bound?) to a symbol. So everything works
nice for me most of the time, except when I load a file created by the
"save-object", in which case I am forced to refer to it by name. 

Larry