Thread View: comp.lang.clos
4 messages
4 total messages
Started by john
Thu, 05 Nov 1992 22:56
class prototypes
Author: john
Date: Thu, 05 Nov 1992 22:56
Date: Thu, 05 Nov 1992 22:56
21 lines
1338 bytes
1338 bytes
Just to complicate things: This discussion seems to assume that the class-prototype is NOT identical to a user-created instance. However, the first time ALLOCATE-INSTANCE was called on a class, an implementation could cache the result as the prototype, unless the prototype already existed (or even if it did?). This could even be done all the way up the superclass chain, thus allowing some classes to have the SAME prototype. One (probably misguided) argument for this behavior would be that it saves space. Of course, the prototype is often (usually?) needed BEFORE the user instantiates a class. Worse, the user might change the class of the cached instance, and the implementation would then have to recover. Still, is there anything in the MOP that proscribes a class prototype from being identical to a user-created instance, or to another class's prototype? John Burger john@mitre.org
class prototypes
Author: Eric Peterson x7644
Date: Fri, 06 Nov 1992 16:07
Date: Fri, 06 Nov 1992 16:07
27 lines
1478 bytes
1478 bytes
>>>>> On Thu, 5 Nov 1992 22:56:02 GMT, john@linus.mitre.org said:
john> Still, is there anything in the MOP that proscribes a class prototype
john> from being identical to a user-created instance, or to another class's
john> prototype?
Hi John;
Other that the requirement that a prototype be accessible by the
generic function class-prototype, the AMOP MOP's silence on the
subject seems to suggest free reign. Have I missed a reference in
there somewhere?
-eric
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
Re: class prototypes
Author: Len Charest
Date: Sat, 07 Nov 1992 00:35
Date: Sat, 07 Nov 1992 00:35
16 lines
1443 bytes
1443 bytes
In article <9211052256.AA05389@thelonius.mitre.org>, john@linus.mitre.org writes:
|> Just to complicate things:
|> Still, is there anything in the MOP that proscribes a class prototype
|> from being identical to a user-created instance, or to another class's
|> prototype?
Interesting question. In my program I'm actually using the class-prototype to
access a *shared* slot (allocation :class). That is, I'm more interested in a
'CLASS-VOLUNTEER' than a prototype. This approach works, but should it?
My understanding is that 'the slots' of class-prototype remain uninitialized;
does this mean shared slots in a prototype are to be inaccessible or unbound?
..................................................
Len Charest, Jr.
JPL Artificial Intelligence Group
charest@aig.jpl.nasa.gov
Why CLASS-PROTOTYPE at all? (was Re: class prototypes
Author: Len Charest
Date: Sat, 07 Nov 1992 00:45
Date: Sat, 07 Nov 1992 00:45
20 lines
1536 bytes
1536 bytes
In article <9211052256.AA05389@thelonius.mitre.org>, john@linus.mitre.org writes:
|> This discussion seems to assume that the class-prototype is NOT
|> identical to a user-created instance.
Maybe some of the designers of PCL and/or CLOS could shed some light on the
origin and history of CLASS-PROTOTYPE. I'd like to know specifically why the
language should be responsible for creating and maintaining 'prototypes'. Why
can't application programs do this as needed? Indeed, I might like to say
something like
(setf (class-prototype my-class) my-instance)
|> Of course, the prototype is often (usually?) needed BEFORE the user
|> instantiates a class.
Needed by CLOS or needed by the programmer? I'd guess the former.
..................................................
Len Charest, Jr.
JPL Artificial Intelligence Group
charest@aig.jpl.nasa.gov
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads