🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.clos
Article #16

Avoiding CLASS-PROTOTYPE (Attn: MOP gods)

#16
From: Eric Peterson x7644
Date: Wed, 04 Nov 1992 02:20
33 lines
2052 bytes
>>>>> On Tue, 3 Nov 1992 00:26:30 GMT, charest@ai-cyclops.jpl.nasa.gov (Len Charest) said:

			     .    .    .

   Len> I use the generic function CLASS-DIRECT-INSTANCES to access
   Len> the instance list.  The following :AROUND method on
   Len> CLASS-PROTOTYPE solves the problem described above.

   Len> (defmethod class-prototype :around ((class caching-class))
   Len>   (let ((prototype (call-next-method)))
   Len>     (setf (class-direct-instances class)
   Len>           (delete prototype (class-direct-instances class) :test #'eq))
   Len>     prototype))

Dear MOP gods;

Since class instance prototypes have nothing but unbound slots, perhaps
the MOP should specify that class instance prototypes be created with
allocate-instance instead of using make-instance (as Lucid has done).
Since class instance prototypes don't need the initializing power of
make-instance, make-instance could be left as a pristine, uncluttered
hook for specializing on the creation of non-prototype instances.  Any
thoughts?


                                   Eric Peterson (speaking for myself)
                                   Systems Research and Applications
                                   2000 15th Street North
                                   Arlington, VA 22201
                                   USA
                                   peterson@sra.com
                                   (703) 558-7644
                                   Fax:  (703) 558-4723
Technical Details
Message-ID: <9211040220.AA14276@verdi.iisd.sra.com>
Path: arc1-ca.pugleaf.net!sparky!uunet!ogicse!emory!swrinde!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!sra.COM!peterson
References: <1992Nov3.002630.23187@jpl-devvax.jpl.nasa.gov>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!ogicse!emory!swrinde!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!sra.COM!peterson
From: peterson@sra.COM (Eric Peterson x7644)
Newsgroups: comp.lang.clos
Subject: Avoiding CLASS-PROTOTYPE (Attn: MOP gods)
Message-ID: <9211040220.AA14276@verdi.iisd.sra.com>
Date: 4 Nov 92 02:20:52 GMT
Article-I.D.: verdi.9211040220.AA14276
References: <1992Nov3.002630.23187@jpl-devvax.jpl.nasa.gov>
Sender: daemon@cis.ohio-state.edu
Organization: The Ohio State University Department of Computer and Information Science
Lines: 33