[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Dynamic Slots



Gregor,

In reply to your request for input, this note describes our usage
of dynamic slots in PCL.

In our application of PCL we set the allocation of our slots to :dynamic
rather than :instance whenver we estimate that each of the corresponding
slot variables has a greater than 75% change of never being assigned a
value.  Almost half of our slots are dynamic.  We don't use any features
particularized for dynamic slots except the :dynamic option.

There is one caveat -- although our dynamic slot variables are usually
never assigned a value, we do read them every so often.  If reading an
unassigned dynamic slot variable would cause it to allocate space, then
we lose, and hence derive no benefit from the dynamic slot mechanism.

In the St. Patrick's Day release of PCL, a bug? prevented allocating
dynamic slots without also specifying an :initform option.  This
restriction rendered dynamic slots useless for our application, since a
read triggers the :initfunction, which then allocates space for the slot
variable.  We are hoping that a later release will lift this
restriction.

We appreciate that you will be continuing to support the :dynamic 
option.