[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Eliminating dynamic slots
- To: macgreg@vaxa.isi.edu
- To: RPG@SAIL.STANFORD.EDU
- To: DLW@ALDERAAN.SCRC.Symbolics.COM
- To: kempf%hplabsc@hplabs.HP.COM
- Subject: Re: Eliminating dynamic slots
- From: Gregor.pa@Xerox.COM
- Date: 31 Mar 87 10:38 PST
- Cc: Gregor.pa@Xerox.COM, commonloops.pa@Xerox.COM
- In-reply-to: macgreg@vaxa.isi.edu (Robert MacGregor)'s message of 30 Mar 87 17:04 PST (Monday)
The real issue here is whether you would like to be able to use
slot-value (nee get-slot) to access your dynamic slots. What about
with-slots? This seems to be what DLW calls syntax.
If you want to use with-slots, you have to be able to give up the notion
of so-called "undeclared" dynamic slots (ones which do not appear in the
defclass form but are created on the fly with get-slot always). On the
other hand, saying that you could use slot-value but not with-slots
seems kludgey. These are the problems that led us to remove :dynamic
slots from the CLOS specification.
In your own program, if you would like slot-value to access your
:dynamic slots, then you will need to define a new meta-class.
If you are willing to use a special function to access dynamic slots,
you don't really need a new metaclass, you can use something like the
property-list-mixin DLW referred to or the code that Jim Kempf
mentioned. It would still be nicer to use a new meta-class since that
would let you put the :dynamic slots in the defclass form which would
help document your program and have all those other nice features.
I will look into adding a meta-class which does this for you, but which
would be written on top of CLOS to the same release of PCL in which I
remove :dynamic slots.