[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: slot types
On Mon, 4 Sep 1995 13:40:49 --100,
Michael.Huebner@PrakInf.TU-Ilmenau.DE (Huebner) wrote:
> An attribut of a slot could be: "partOf" -slot.
> When an object is copied all objects in partOf -slots
> of this object are also copied.
> A parent slot could be a partOf slot, too.
This would make working with "data parents" a lot easier than
it currently is.
My system of "slot types" cannot handle this, however. Different
slot types are simply different behaviors when the slot is the
result of a lookup. You want them to be treated differently when
the object is cloned. My system, in fact, can't even handle
slots differently during lookup ( parent or non-parent )!!
TinySelf does a linear search for slots ( yuck! ) and the map
has a field that says how many parents an object has ( always
the first N ). This is simply horrible, I know, and I hope
to change it in future versions.
Besides multiple different behaviors, a neat thing to have for
slot types is some state associated with a slot - an invocation
counter, for example. Moostrap has this.
On Thu, 31 Aug 1995 13:26:36 -0700,
David.Ungar@Eng.Sun.COM (David Ungar) wrote:
> Thanks--your interpreter idea is interesting.
> You could choose whether or not to expose slot types.
> We have talked about exposed slot types in the past--
> it is an interesting debate.
I choose to expose and not to expose.
No... I am not training to be a Zen master :-) ( though I can
clap with just one hand :-)
But not adding any syntax for this, it will be impossible for
the normal Self programmer to stumble on this early on. Only by
diving very deep into mirrors will the advanced system hacker
get to see the slot types. If it is true that:
"Easy things should be easy. Hard things should be possible."
I would add that the complex things should be hidden until they
are really needed.