[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Issue: FUNCTION-TYPE-REST-LIST-ELEMENT, FUNCTION-DECLARATION issues
- To: Kent M Pitman <KMP@stony-brook.scrc.symbolics.com>
- Subject: Re: Issue: FUNCTION-TYPE-REST-LIST-ELEMENT, FUNCTION-DECLARATION issues
- From: sandra%orion@cs.utah.edu (Sandra J Loosemore)
- Date: Thu, 3 Dec 87 11:57:05 MST
- Cc: Masinter.pa@xerox.com, cl-cleanup@sail.stanford.edu, sandra%orion@cs.utah.edu
- In-reply-to: Kent M Pitman <KMP@STONY-BROOK.SCRC.Symbolics.COM>, Thu, 3 Dec 87 12:52 EST
One reason for wanting to use a FUNCTION type specifier is that you may
only be concerned with how many arguments a function can take, and you
don't care at all about their types. Back when we were trying to
implement a CL compatibility package in PSL, we wanted to do the
matching of actual arguments to lambda variables at compile-time so we
could use the EXPR call protocol instead of the much slower NEXPR
protocol. (Basically, we had an EXPR entry point for every function
with a 1-1 correspondence between actual arguments and lambda
variables.) The problem is, you couldn't do the transformation on a
call unless you already knew something about the lambda list for the
function.
I agree that the argument type business is confusing and not very useful
in its current state. I'd like to say that
(LOCALLY (DECLARE (FTYPE (FUNCTION (INTEGER INTEGER) INTEGER) +))
(+ X Y))
is equivalent to
(THE INTEGER (+ (THE INTEGER X) (THE INTEGER Y)))
but I'm not sure that's exactly what CLtL is getting at.
-Sandra
-------