[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
- To: Guy Steele <email@example.com>
- Subject: TYPE-OF
- From: Robert W. Kerns <RWK@YUKON.SCRC.Symbolics.COM>
- Date: Fri, 21 Nov 86 15:30 EST
- Cc: DLW@ALDERAAN.SCRC.Symbolics.COM, firstname.lastname@example.org, common-lisp@SU-AI.ARPA, email@example.com
- In-reply-to: <861120151614.4.GLS@HILARION.THINK.COM>
Date: Thu, 20 Nov 86 15:16 EST
From: Guy Steele <firstname.lastname@example.org>
One might want (TYPE-OF 2) => (INTEGER 2 2), or perhaps just (INTEGER 2)
and define (INTEGER x) <=> (integer x x). But this does not seem to
generalize nicely to other data types.
If the goal is that TYPE-OF should return the most specific possible
type, then clearly when applied to object x it should return (MEMBER x),
as that is the most specific type that contains x. But this is not
very useful, and therefore this goal is not what we really want.
Right. That's why I proposed specifying a "least specific"
type, saying that "it must be at least this specific". Combine
this with the requirement that whatever is actually returned
must be understood by SUBTYPEP (i.e. SUBTYPEP of that type
and the "least specific" type specified must return T T).
- From: Guy Steele <email@example.com>