[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Types of Functions
- To: NGALL@G.BBN.COM
- Subject: Re: Types of Functions
- From: mike@a
- Date: Thu, 3 Jul 86 09:18 EST
- Cc: Fahlman@C.CS.CMU.EDU, Rice@SUMEX-AIM.ARPA, Common-Lisp@SU-AI.ARPA
Date: 3 Jul 1986 02:09-EDT
Why is it that in CLtL (p 76) Functionp is the only type
predicate which is not specified to be equivalent to
(typep foo 'function)?
(typep foo 'function) causes an error to be signalled according to
page 47. Perhaps that is why functionp is not defined in terms of it?
On pg. 47, the spec states that type SIGNATURES cannot be used to
discriminate types. However, the type "function" is not a signature.
Clearly (typep foo '(function (...) ...)) shouldn't be allowed
since it is obvious that one cannot decide it, or even try to decide it
in any reasonable way.
For example (typep foo (satisfies #'my-type-predicate)) is reasonable
since one can at least run the satisfies function on the object "foo".
But in (typep foo '(function ((satisfies #'my-type-predicate)) t))),
there is absolutely no way to know, and nothing to try to run to find out.
However, there is no reason why (typep foo 'function) should cause any
problems. It should be equivalent to (functionp foo).