From: Vladimir Zolotykh
Subject: standard-object
Date: 
Message-ID: <3C0F759A.8CD884EA@eurocom.od.ua>
Conider the following from CLHS about the standard-object:

"The class standard-object is an instance of standard-class
and is a superclass of every class that is an instance of standard-class 
except itself."

No question about

  (typep (find-class 'standard-object) 'standard-class) => t

But what is the correct (conforming) result for:

  (subtypep 'standard-class 'standard-object) ?

ACL and CMUCL seems to disagree here.

Also I read in OOCL by S. Slade (pp. 518)

"standard-object - Subclass of T. It is the direct superclass of
standard-class, standard-method, and standard-generic-function."

And for arbitrary class foo 

  (defclass foo () ())

cl-user(169): (subtypep 'foo 'standard-object)
t
t
cl-user(170): (typep (find-class 'foo) 'standard-class)
t

Doesn't this imply that some relation should exist between
standard-object and standard-class ?

Would you mind to clarify this a bit more detail ?

-- 
Vladimir Zolotykh                         ······@eurocom.od.ua
From: Barry Margolin
Subject: Re: standard-object
Date: 
Message-ID: <ZqMP7.1$jn.27813@burlma1-snr2>
In article <·················@eurocom.od.ua>,
Vladimir Zolotykh  <······@eurocom.od.ua> wrote:
>Conider the following from CLHS about the standard-object:
>
>"The class standard-object is an instance of standard-class
>and is a superclass of every class that is an instance of standard-class 
>except itself."
>
>No question about
>
>  (typep (find-class 'standard-object) 'standard-class) => t
>
>But what is the correct (conforming) result for:
>
>  (subtypep 'standard-class 'standard-object) ?
>
>ACL and CMUCL seems to disagree here.

CLHS says that the class precedence list is: standard-class, class,
standard-object, t

This implies that the result should be T.

>Also I read in OOCL by S. Slade (pp. 518)
>
>"standard-object - Subclass of T. It is the direct superclass of
>standard-class, standard-method, and standard-generic-function."

According to CLHS, it's not actually the direct superclass, since CLASS is
in between them.

>And for arbitrary class foo 
>
>  (defclass foo () ())
>
>cl-user(169): (subtypep 'foo 'standard-object)
>t
>t
>cl-user(170): (typep (find-class 'foo) 'standard-class)
>t
>
>Doesn't this imply that some relation should exist between
>standard-object and standard-class ?

Not really.  If the language didn't specify the relation as I described
above, it would be permissible for standard-class to be a subclass of some
implementation-dependent class.  In fact, allowing this might make things
easier for implementors, because it can make it easier to bootstrap CLOS
and avoids some tricky infinite regress issues.

-- 
Barry Margolin, ······@genuity.net
Genuity, Woburn, MA
*** DON'T SEND TECHNICAL QUESTIONS DIRECTLY TO ME, post them to newsgroups.
Please DON'T copy followups to me -- I'll assume it wasn't posted to the group.