Article View: comp.lang.clos
Article #144The class STANDARD-OBJECT
From: rharris
Date: Tue, 18 Aug 1992 15:15
Date: Tue, 18 Aug 1992 15:15
47 lines
2708 bytes
2708 bytes
The implementation of CLOS in Lucid's Sun Common Lisp 4.0.1 disagrees with
the MOP specified in chapters 5 and 6 of "The Art of the Metaobject Protocol"
about a fundamental issue: the meaning of the classes STANDARD-OBJECT and
FUNCALLABLE-STANDARD-OBJECT. This disagreement is likely to cause portability
problems for some programs.
The classes STANDARD-OBJECT and FUNCALLABLE-STANDARD-OBJECT are meant to be
"maximal elements" of some set of classes. The disagreement is over which
set. There are really three sets of classes that are relevant:
(1) The set of all subclasses of STANDARD-CLASS,
(2) The set of all subclasses of FUNCALLABLE-STANDARD-CLASS, and
(3) The union of (1) and (2).
In PCL, STANDARD-OBJECT is the maximal element for set (3), and
FUNCALLABLE-STANDARD-OBJECT is the maximal element for set (2),
and there is no class corresponding to the maximal element for set (1).
In Lucid's Common Lisp, STANDARD-OBJECT is the maximal element for set (1),
and FUNCALLABLE-STANDARD-OBJECT is the maximal element for set (2),
and there is no class corresponding to the maximal element for set (3).
I believe that all three of these classes should exist, and I think that
the most important of them is the class for (3), because it is this class that
users are most likely to want to specialize on in order to operate on all
instances. I think that it would be helpful for us to agree on names
for both the class for (1) and the class for (3).
Also, it would be good to define a class whose direct subclasses are
STANDARD-CLASS and FUNCALLABLE-STANDARD-CLASS (PCL has no such class;
in Lucid's CLOS this class is called CLOS::SLOTTED-CLASS).
This same issue applies to structure classes. There two additional
interesting sets of classes:
(4) The set of all subclasses of STRUCTURE-CLASS, and
(5) The union of (1), (2), and (4).
Note: Versions of PCL earlier than March 92 PCL do not have the class
STRUCTURE-CLASS.
In PCL, STRUCTURE-OBJECT is the maximal element for set (4), and
PCL::SLOT-OBJECT is the maximal element for set (5). Also, the class
PCL::SLOT-CLASS corresponds to set (5).
In Lucid's Common Lisp, STRUCTURE-OBJECT is the maximal element for set (4),
and there is no class corresponding to the set (5).
--------------
Richard Harris
Technical Details
Message-ID:
<9208182315.AA19905@dice0>Path:
arc1-ca.pugleaf.net!sparky!uunet!cis.ohio-state.edu!rdrc.rpi.edu!rharrisShow Full Headers
Complete Article Headers
Newsgroups: comp.lang.clos Path: arc1-ca.pugleaf.net!sparky!uunet!cis.ohio-state.edu!rdrc.rpi.edu!rharris From: rharris@rdrc.rpi.edu Subject: The class STANDARD-OBJECT Message-ID: <9208182315.AA19905@dice0> Sender: daemon@cis.ohio-state.edu Organization: The Ohio State University Department of Computer and Information Science Date: Tue, 18 Aug 1992 15:15:38 GMT Lines: 47