[Bese-devel] ucw special slots

Attila Lendvai attila.lendvai at gmail.com
Fri May 5 09:16:08 UTC 2006


> Alternatively we thought about using ":component nil" to indicate the same,
> but this kind of appears to be saying I don't want it to be a component.
> This does capture the idea of getting an unbound slot though.

i'm using that, too. from one point of view it might seem odd, because
nil is false in cl. but if you look at it so that :component means
that it's a component slot, and its argument is the initform of the
slot, then it looks logical.

> Alternatively we could add to the standard-component-direct-slot a slot
> named componentp or some such.

if you ever start playing with the standard-component(-class) code,
please consider factoring out the :component nil behaviour into a
separate feature. i've tried to create a
component-hierarchy-node-mixin that has the lightweigth behaviour
(parent slot, :component slots auto setf-ing place, etc) of component
(leaving out backtracking and such), but i'm not a MOP guru and
failed. for now i have a local patch that makes components
instantiatable outside of a request context, but it's a waste
comparing to that single feature i want: auto setf-ing the place of
components being put in :component slots of something that is not a
full-blown component.

> Next to this, I am implementing a nice child-components function that will
> give you the values of all the slots that are component-slots, and have
> components in them.

consider the case of containers. unfortunately there is some anomaly
in container.lisp, which is my fault. switching-container does not
inherit from component, while list-container does. one can find pro
reasons for this, but still it's strange why one of them is not like
the other. (the clean solution would probably be that neither is a
component, but i can't really decide...)

but either way, containers ought to be handled in a function like
child-components. and if swithing-container is not a component...

- attila

(alias 101 on irc &no 'its not lisp code :)


More information about the bese-devel mailing list