[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

re: Random metaclasses for CL types



> I wish we could bring this conversation back down to earth.  All I want
> to know is what one-line change to make to the draft ANSI Common Lisp
> spec where it says what a conforming program can assume about the
> behavior of objects of the built-in types.

I thought your proposed wording of May 10 was sufficient:

  Each class that corresponds to a predefined Common Lisp type specifier
  can be implemented in one of four ways, at the discretion of each
  implementation.  It can be a {\bit standard class\/} (of the kind
  defined by {\bf defclass}), a {\bit structure class\/} (defined
  by {\bf defstruct}), a {\bit built-in class\/} (implemented in
  a special, non-extensible way), or any other implementation-defined
  class that is no more restrictive than a {\bit built-in class\/}.

I think that the question about what "no more restrictive" means is not a
problem when this paragraph is viewed together with the paragraph that
follows it in the draft.

I'm a little concerned, though, about the following paragraph:

  It is possible to determine whether a class is a built-in class by
  checking the metaclass.  A standard class is an instance of {\bf
  standard-class}, a built-in class is an instance of {\bf
  built-in-class}, and a structure class is an instance of {\bf
  structure-class}.

I wouldn't want this to be interpreted in a way that would rule out
subclasses of BUILT-IN-CLASS.  Suppose it said:

  It is possible to determine whether a class is a built-in class by
  checking the metaclass.  A standard class is one for which (TYPEP
  class 'STANDARD-CLASS) is true, a built-in class is one for which
  (TYPEP class 'BUILT-IN-CLASS) is true, and a structure class is one
  for which (TYPEP class 'STRUCTURE-CLASS) is true.

Also, I just remembered that I don't think that the class CLASS is
mentioned prior to chapter 3.  It would be helpful for the standard to
specify that BUILT-IN-CLASS, STANDARD-CLASS, STRUCTURE-CLASS, and any
other implementation-defined metaclasses are all subclasses of CLASS.
Probably this belongs on page 1-33.


n't GENERIC-FUNCTION already understood
to be a class that is not directly instantiated?