Path: utzoo!mnetor!uunet!lll-winken!lll-tis!ames!umd5!umbc3!alex
From: alex@umbc3.UMD.EDU (Alex S. Crain)
Newsgroups: comp.lang.lisp
Subject: Re: query 'bout defstruct (Common LISP)
Message-ID: <974@umbc3.UMD.EDU>
Date: 11 May 88 01:34:44 GMT
References: <10834@cgl.ucsf.EDU> <5190@bcsaic.UUCP> <28800@yale-celray.yale.UUCP>
Reply-To: alex@umbc3.UMD.EDU (Alex S. Crain)
Organization: University of Maryland, Baltimore County
Lines: 32
Keywords: defstruct, symbols, confusion

In article <28800@yale-celray.yale.UUCP> krulwich-bruce@CS.YALE.EDU (Bruce Krulwich) writes:
>In article <10834@cgl.ucsf.EDU> yee@cgl.ucsf.edu (dave yee) writes:
>>...  Now for the tricky part.  I will have a variable number of
>>"pieces" at any given time in the program.  So i would like the
>>computer to generate new symbols for me.  The new symbols would then
>>be used as names for the new pieces.
>
>I have to ask:  Why would you ever want to do this??  If you're going
>to have a variable number of pieces then you'll want to store them in
>a list or table anyway.  Why bother GENing symbols??  

	I did not post the original request, but I have this identical problem
for a project that I'm doing now. The motivation behind the gensyms is to 
avoid a list or table structure. My project is projecting a dynamic knowege
base over a neural net built on interrelated symbols. Symbols have the 
advantage of not having an explicit value when they are generated, so I can
bind an undefined object, and define it's value later.

	The symbol tags also mean that I don't have to jerk around with a table
lookup,	in that I can use the existing interface (ie: the obstack).

	Using symbols over list elements or table indexes makes tracing
through the resulting data structure a piece of cake.

	Symbols can have plists.


	I welcome rebuttles to any of these motives....

-- 
					:alex.

nerwin!alex@umbc3.umd.edu
alex@umbc3.umd.edu