[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Issue: FUNCTION-TYPE-REST-LIST-ELEMENT, FUNCTION-DECLARATION issues



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
-------