[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Issue: TYPE-OF-UNDERCONSTRAINED
- To: masinter.pa@Xerox.COM
- Subject: Issue: TYPE-OF-UNDERCONSTRAINED
- From: David A. Moon <Moon@STONY-BROOK.SCRC.Symbolics.COM>
- Date: Wed, 28 Sep 88 13:59 EDT
- Cc: cl-cleanup@SAIL.STANFORD.EDU
- In-reply-to: <880921-024739-5696@Xerox>
- Line-fold: No
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.