[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
type-of
- To: Masayuki Ida <z30083%ccut.u-tokyo.junet%utokyo-relay.csnet@RELAY.CS.NET>
- Subject: type-of
- From: Rob MacLachlan <RAM@C.CS.CMU.EDU>
- Date: Mon, 17 Nov 1986 22:03:00 -0000
- Cc: common-lisp@SU-AI.ARPA, ida%u-tokyo.junet@RELAY.CS.NET
- In-reply-to: Msg of Mon 17 Nov 86 18:06:12+0900 from Masayuki Ida <z30083%ccut.u-tokyo.junet%utokyo-relay.csnet at RELAY.CS.NET>
I think that your suggestion is contrary to the intent of the
specification. The "most specific" type can hardly ever be
represented by symbol, since there is almost always a more specific
type that does make use of a list type-specifier. Although it is
difficult to specify just how specific the type must be, it is clearly
a step in the wrong direction to require it to be a symbol.
It would also be wrong for NIL to be returned to indicate a random
object, since NIL is a meaningful type, but not one that any object
can posess. It would make more sense to return T or a new type such
as RANDOM.
I also have some doubts about the need to specify what Type-Of
returns. Could you demonstrate some code that needs to use Type-Of
and is adversely affected by different implementations? I suppose
that we could rigorously specify some function that does what you
want, but it shouldn't be Type-Of.
Rob