Re: stklos-modification

From: Erick Gallesio <eg_at_kaolin.unice.fr>
Date: Tue, 19 May 1998 12:13:48 +0300

Thomas Buerger writes:
> In CHANGES one finds:
> --------
> About STklos
> ...
> * Standard behavior of class slots is now identical to
> CLOS: when a class-slot is inherited, it is shared
> with instances of the superclass. If it is redefined,
> a new slot is created
> ...
>
> This is nice! But I need also the behaviour of STk-3.1 in my application.
> So I patched stklos.stk defining a :thisclass-SLOT with the
> behaviour of the :class-SLOT in STk-3.1:
>
> $ diff stklos.stk.orig stklos.stk
> 658a659,665
> > (:thisclass ;; As in STk-3.1:
> > ;; shared by objects of only one class and not its derived
> > ;; objects! (Thomas Buerger, April 1998)
> > (let ((shared-cell (make-vector 1)))
> > (list (lambda (o) (vector-ref shared-cell 0))
> > (lambda (o v) (vector-set! shared-cell 0 v)))))
> >
>
> Perhaps this "feature" can be integrated in future STk-Versions?

Yes. I have integrated it for the next release. I have just changed the
name of this allocation scheme to :each-subclass. The name comes from Dylan
(at least the first version of Dylan):
  "each-subclass ndicates that the class gets ones storage location for
   the slot, to be used by all the direct instances of the class. In
   addition, every subclass of the class gets a storage location for the slot,
   for use by its direct instances."



                -- Erick
Received on Tue May 19 1998 - 14:07:57 CEST

This archive was generated by hypermail 2.3.0 : Mon Jul 21 2014 - 19:38:59 CEST