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

Re: Oh no! No #'slot-value-using-class?



> Did not see it in apropos (or Steele!), either.

MOP is not in CLtL (any version) or ANSI-CL.

> I wanted to play a little game with slot-values, hiding it from the
> programmer (me!). I was going to use a dotted pair in each slot. The car
> would be the value. If nil, the cdr would be a lambda capable of
> calculating the value, which would then be cached in the car. I was going
> to use 'reinit... to explicitly clear car's when circumstances required the
> calculations be made afresh.

You can get the effect you want via methods on slot-unbound that use the
slot name to look up the lambda in a side table, with reinit calling
slot-makunbound.  No need for slot-value-using-class here.