DECLARE-TYPE-EXACTCLOS, compiler writers may not be able to optimize out method lookup at compile time, if the class of a CLOS object or a DEFSTRUCT (called "user defined classes" for purposes of this proposal) cannot be exactly determined at compile time.UPPERCASE indicates bold, _this_ indicates italic)
EXACT-CLASS _class-specifier_ _var1_ _var2_ ... ) affects only variable bindings and specifies that the variables mentioned will take on values only of the specified user defined class, and no other. In particular, _vari_ is of exact class _class-specifier_ if, letting _subclass-specifier(j)_ be a subclass of _class_specifier_, then, for all _j_, (SUBTYPEP _vari_ _subclass-specifier(j)_) is false. It is an error if _class-specifier_ specifies an instance of STANDARD-TYPE-CLASS.
CLOS. Should not impact currently existing code, because built-in Common Lisp types are specifically excluded.
> I'm reluctant to deal with EXACT-CLASS in CL-CLEANUP since it makes no > sense outside of CLOS. (This wasn't true of TRACE-FUNCTION-ONLY where > there were other kinds of things to trace and CLOS just was a good > motivation.)
Kempf: The original idea was to include built-in types as well, but there was some resistence to this, based on the fact that some implementations may subtype automatically, and the subtype may not be structurally equivalent. An example is using cdr-coding for a list. While I believe that operator equivalence is the more appropriate criterion, and hence such automatic subtyping should not be a problem, the concensus seemed to be to restrict EXACT-CLASS to user defined types, including DEFSTRUCTs. At the September meeting, we considered if there were any built-in types for which declaring something EXACT-CLASS could make a difference, and the conclusion was no, I believe. With CLOS, of course, it would allow insertion of a method whose discriminators were built-in, but without CLOS, it would not make a difference, except for DEFSTRUCTs.
In addition, the objects committee also seemed to believe this was a clean-up issue. I fear it may get lost between the two, however, I'll bring it up again in November.
jak