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

Re: Gregor's comments on some things

        What does the phrase "x is of class array mean"?  In
        the first paragraph of the section Integrating Types and
        Classes in Concepts (draft of 1/23) it is used to mean "x is of
        class array or some subclass of array"?  Is that official?

    I think so.  I believe "X is of class Y" and "X is an instance
    of Y" mean that (class-of X) is Y or a subclass of Y, rather than
    (eq (class-of X) Y).

This whole terminology issue would be easier if we up front indicated
that classes are used to reify Common Lisp types specified by (most of)
the type specifer symbols.  Hence, we could use the expression "x is of
type array" in its usual sense (any subtype will do), and
  (typep x (class-name class))
is the same as
  (classp x class)
What do you think about extending typep to allow
(typep x class).

Another implication of going to this terminology is that we could say
class C1 is a subtype of class C2 meaning that C1 is C2 or is some
subclass of C2.

Another terminological suggestion.  To eliminate the two uses of the
term "metaclass", I suggest that we reserve metaclass to mean a class
whose instances are classes, and use the term "metatype" to refer to the
relationship of an instance to the class of its class, that is 
"it is the metatype of an instance that determines its implementation."

    Well, it's pretty weird that symbols are turned into class
    objects but QUOTE-expressions are not.  This doesn't generalize
    very well to the extension to supporting other Common Lisp type

This does generalize in the sense that classes correspond to type
symbols, and list expressions correspond to list type specifiers.
 (QUOTE X) means (MEMBER (X)).  Thus the language generalizes in
correspondence to CLtL.  A second answer is that this is the internal
representation of add-method etc. and is designed to keep dependence on

    Of course it makes get-method and related functions useless
    until we put in the supporting functions such as class-named.  Is
    there any reason that these aren't documented already?  
I sent one message describing them already.  The only issue I know is
what class-name should do if the class has no name.  Two options are:
1) Signal an error
2) class-name has a second optional argument which is the value returned
if class has no name.
(class-named name &optional no-error-flag)
returns the class with the name given or signals an error.

    Do you Gregor, or anyone else, have a list of these missing
    functions?  I'm not talking about the full meta-object protocol,
    just the functions needed to program at the next level of
    abstraction below the defxxx macros.
I will get a message out about these.