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


    Date: 21 Sep 88 02:47 PDT
    From: masinter.pa@Xerox.COM

    This is in response to mail under COERCE-FROM-TYPE and TYPE-OF. I would prefer
    to constrain TYPE-OF to be at least as specific as (CLASS-NAME (CLASS-OF x)). 

That seems like a reasonable idea.

    I'm less sure what to do about instances of unnamed classes; the Medley way
    would be to return the class itself for an otherwise nameless class. 

TYPE-OF could return NIL in that case, which is a subtype of everything (ha ha).
Since CLOS says class objects are acceptable wherever type specifiers are,
I think the Medley way is okay.

    This would disallow what is otherwise "legal" now: namely to have TYPE-OF return
    T for everything but structure instances. 

    I think it probably is reasonable also to constrain TYPE-OF to be something that
    SUBTYPEP can deal with. (cf SUBTYPEP-TOO-VAGUE). 

I'm less sure of this, since I can't figure out if there are any ramifications.

It's not worth putting a lot of effort into TYPE-OF, since if you want something
well-defined you definitely use CLASS-OF rather than TYPE-OF.