[Bese-devel] Re: :component slots and the slot value

Marco Baringer mb at bese.it
Tue Nov 21 15:40:52 UTC 2006


"Attila Lendvai" <attila.lendvai at gmail.com> writes:

> hi!
>
> i was looking at the code that initializes :component slots, and i
> couldn't understand what it was meant to be doing. it was taking the
> slot value when available and passed it to the component to be created
> as initargs.
>
> (slot-name (list 1 2) :component (foo 3 4))
>
> would end up in a (apply #'make-instance 'foo (list 3 4 1 2))

that's not what is supposed to happen....

> my question is: is anybody relaying on this? and am i the only one
> finding it confusing?

it's confusing and i hope nobody is relying on it.

> i think this behaviour would be much more intuitive: a :component (foo
> 1 2) would end up in a (make-instance 'foo 1 2) iff the slot was not
> already initialized to something, iow it's unbound. otherwise the slot
> is left alone.

that was my intention with initialize-component-slots, it will only
set the slot when the slot is bound and it's value isn't nil. anything
else is a bug.

> i have this modification recorded here and if nobody speaks up for
> long enough, i'll push them.

do it.

-- 
-Marco
Ring the bells that still can ring.
Forget your perfect offering.
There is a crack in everything.
That's how the light gets in.
	-Leonard Cohen




More information about the bese-devel mailing list