118 lines
6.8 KiB
HTML
118 lines
6.8 KiB
HTML
<!-- Common Lisp HyperSpec (TM), version 7.0 generated by Kent M. Pitman on Mon, 11-Apr-2005 2:31am EDT -->
|
|
<HTML>
|
|
<HEAD>
|
|
<TITLE>CLHS: Issue METACLASS-OF-SYSTEM-CLASS Writeup</TITLE>
|
|
<LINK HREF="../Data/clhs.css" REL="stylesheet" TYPE="text/css" />
|
|
<META HTTP-EQUIV="Author" CONTENT="Kent M. Pitman">
|
|
<META HTTP-EQUIV="Organization" CONTENT="LispWorks Ltd.">
|
|
<LINK REL=TOP HREF="../Front/index.htm">
|
|
<LINK REL=COPYRIGHT HREF="../Front/Help.htm#Legal">
|
|
<LINK REL=DISCLAIMER HREF="../Front/Help.htm#Disclaimer">
|
|
<LINK REL=PREV HREF="../Issues/iss240_w.htm">
|
|
<LINK REL=UP HREF="../Issues/iss241.htm">
|
|
<LINK REL=NEXT HREF="../Issues/iss242_w.htm">
|
|
</HEAD>
|
|
<BODY>
|
|
<H1><A REV=MADE HREF="http://www.lispworks.com/"><IMG WIDTH=80 HEIGHT=65 ALT="[LISPWORKS]" SRC="../Graphics/LWSmall.gif" ALIGN=Bottom></A><A REL=TOP HREF="../Front/index.htm"><IMG WIDTH=237 HEIGHT=65 ALT="[Common Lisp HyperSpec (TM)]" SRC="../Graphics/CLHS_Sm.gif" ALIGN=Bottom></A> <A REL=PREV HREF="../Issues/iss240_w.htm"><IMG WIDTH=40 HEIGHT=40 ALT="[Previous]" SRC="../Graphics/Prev.gif" ALIGN=Bottom></A><A REL=UP HREF="../Issues/iss241.htm"><IMG WIDTH=40 HEIGHT=40 ALT="[Up]" SRC="../Graphics/Up.gif" ALIGN=Bottom></A><A REL=NEXT HREF="../Issues/iss242_w.htm"><IMG WIDTH=40 HEIGHT=40 ALT="[Next]" SRC="../Graphics/Next.gif" ALIGN=Bottom></A></H1>
|
|
|
|
<HR>
|
|
|
|
|
|
|
|
<H2>Issue METACLASS-OF-SYSTEM-CLASS Writeup</H2>
|
|
|
|
<PRE><B>Issue:</B> <A HREF="iss241.htm">METACLASS-OF-SYSTEM-CLASS</A><P>
|
|
Reference: X3J13/92-102, dpANS 12.24<P>
|
|
Section 4.3.7, "Integrating Types and Classes", p.4-16..418<P>
|
|
X3J13/92-3105, Kim Barrett comment #5<P>
|
|
<B>Category:</B> CHANGE<P>
|
|
<B>Edit History:</B> Version 1, 1/6/93, Kim Barrett<P>
|
|
<B>Status:</B> Proposal UNSPECIFIED accepted, March 1993<P>
|
|
<P>
|
|
<B>Problem Description:<P>
|
|
</B><P>
|
|
The fifth and seventh paragraphs on p.4-17 say<P>
|
|
<P>
|
|
Each \term{class} that corresponds to a predefined \term{type specifier}<P>
|
|
can be implemented in one of three ways, at the discretion of each<P>
|
|
implementation. It can be a \term{standard class}, a<P>
|
|
\term{structure class}, or a \term{built-in class}.<P>
|
|
<P>
|
|
It is possible to determine whether a \term{class} is a<P>
|
|
\term{built-in class} by checking the \term{metaclass}. A<P>
|
|
\term{standard class} is an \term{instance} of \theclass{standard-class},<P>
|
|
a \term{built-in class} is an \term{instance} of<P>
|
|
\theclass{built-in-class}, and a \term{structure class} is an<P>
|
|
\term{instance} of \theclass{structure-class}.<P>
|
|
<P>
|
|
This prohibits implementations from using implementation-specific metaclasses<P>
|
|
which are not subclasses of one of the three defined metaclasses<P>
|
|
(<A REL=DEFINITION HREF="../Body/t_std_cl.htm#standard-class"><B>STANDARD-CLASS</B></A>, <A REL=DEFINITION HREF="../Body/t_stu_cl.htm#structure-class"><B>STRUCTURE-CLASS</B></A>, and <A REL=DEFINITION HREF="../Body/t_built_.htm#built-in-class"><B>BUILT-IN-CLASS</B></A>). This prohibition<P>
|
|
gratuitously limits implemention freedom, since it serves no useful purpose<P>
|
|
for users.<P>
|
|
<P>
|
|
Depending on how the uses of the term \term{instance} are disambiguated in<P>
|
|
the second paragraph, it may actually be making the stronger requirement that<P>
|
|
\term{direct instances} of these metaclasses be used.<P>
|
|
<P>
|
|
<B>Proposal (METACLASS-OF-SYSTEM-CLASS:UNSPECIFIED):<P>
|
|
</B><P>
|
|
Change the fifth paragraph on p.4-17 by replacing the occurance of the term<P>
|
|
\term{built-in class} with the term \term{system class}, so that it says<P>
|
|
<P>
|
|
Each \term{class} that corresponds to a predefined \term{type specifier}<P>
|
|
can be implemented in one of three ways, at the discretion of each<P>
|
|
implementation. It can be a \term{standard class}, a<P>
|
|
\term{structure class}, or a \term{system class}.<P>
|
|
<P>
|
|
<B>Editorial Impact:<P>
|
|
</B><P>
|
|
One tiny edit.<P>
|
|
<P>
|
|
<B>Rationale:<P>
|
|
</B><P>
|
|
Allows system classes to be implemented using implementation specific<P>
|
|
metaclasses that are not themselves subclasses of any of the standardized<P>
|
|
metaclasses, and therefore can be implemented in whatever manner is<P>
|
|
deemed appropriate by the implementor without the need to override possibly<P>
|
|
undesirable features of the inherited standardized metaclass.<P>
|
|
<P>
|
|
<B>Examples:<P>
|
|
</B><P>
|
|
(<A REL=DEFINITION HREF="../Body/f_typep.htm#typep"><B>typep</B></A> (<A REL=DEFINITION HREF="../Body/f_find_c.htm#find-class"><B>find-class</B></A> '<A REL=DEFINITION HREF="../Body/t_stream.htm#stream"><B>stream</B></A>)<P>
|
|
'(<A REL=DEFINITION HREF="../Body/a_or.htm#or"><B>or</B></A> <A REL=DEFINITION HREF="../Body/t_std_cl.htm#standard-class"><B>standard-class</B></A> <A REL=DEFINITION HREF="../Body/t_stu_cl.htm#structure-class"><B>structure-class</B></A> <A REL=DEFINITION HREF="../Body/t_built_.htm#built-in-class"><B>built-in-class</B></A>))<P>
|
|
\EV \term{implementation-dependent}<P>
|
|
<P>
|
|
<B>Current Practice:<P>
|
|
</B><P>
|
|
Of the half dozen implementations I checked, none obeyed even the<P>
|
|
weaker of requirements mentioned in the problem description.<P>
|
|
<P>
|
|
<B>Cost to Implementors:<P>
|
|
</B><P>
|
|
None. This does not <A REL=DEFINITION HREF="../Body/f_provid.htm#require"><B>require</B></A> any implementation to change.<P>
|
|
<P>
|
|
<B>Cost to Users:<P>
|
|
</B><P>
|
|
Small. Any program that was specializing some generic function on<P>
|
|
<A REL=DEFINITION HREF="../Body/t_std_cl.htm#standard-class"><B>standard-class</B></A>, <A REL=DEFINITION HREF="../Body/t_stu_cl.htm#structure-class"><B>structure-class</B></A>, and <A REL=DEFINITION HREF="../Body/t_built_.htm#built-in-class"><B>built-in-class</B></A> (with the idea that this<P>
|
|
covered all the possibilities) would have to change. Such a program is<P>
|
|
already non-portable. The obvious change is to instead specialize on <A REL=DEFINITION HREF="../Body/t_class.htm#class"><B>class</B></A>.<P>
|
|
<P>
|
|
<B>Performance Impact:<P>
|
|
</B><P>
|
|
None.<P>
|
|
<P>
|
|
<B>Discussion:<P>
|
|
</B><P>
|
|
This issue was discussed extensively in private mail during February 1992,<P>
|
|
under the Subject line "implementation of a system class".<P>
|
|
<P>
|
|
</PRE>
|
|
<HR>
|
|
|
|
<A REL=NAVIGATOR HREF="../Front/StartPts.htm"><IMG WIDTH=80 HEIGHT=40 ALT="[Starting Points]" SRC="../Graphics/StartPts.gif" ALIGN=Bottom></A><A REL=TOC HREF="../Front/Contents.htm"><IMG WIDTH=80 HEIGHT=40 ALT="[Contents]" SRC="../Graphics/Contents.gif" ALIGN=Bottom></A><A REL=INDEX HREF="../Front/X_Master.htm"><IMG WIDTH=80 HEIGHT=40 ALT="[Index]" SRC="../Graphics/Index.gif" ALIGN=Bottom></A><A REL=INDEX HREF="../Front/X_Symbol.htm"><IMG WIDTH=80 HEIGHT=40 ALT="[Symbols]" SRC="../Graphics/Symbols.gif" ALIGN=Bottom></A><A REL=GLOSSARY HREF="../Body/26_a.htm"><IMG WIDTH=80 HEIGHT=40 ALT="[Glossary]" SRC="../Graphics/Glossary.gif" ALIGN=Bottom></A><A HREF="../Front/X3J13Iss.htm"><IMG WIDTH=80 HEIGHT=40 ALT="[Issues]" SRC="../Graphics/Issues.gif" ALIGN=Bottom></A><BR>
|
|
|
|
<A REL=COPYRIGHT HREF="../Front/Help.htm#Legal"><I>Copyright 1996-2005, LispWorks Ltd. All rights reserved.</I></A><P>
|
|
</BODY>
|
|
</HTML>
|