[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Some notes about declarations
- To: Common-Lisp@SU-AI.ARPA
- Subject: Some notes about declarations
- From: Kent M Pitman <KMP@SCRC-STONY-BROOK.ARPA>
- Date: Tue, 11 Mar 86 17:48 EST
Do we provide a way to type-declare functions (ie, FTYPE) that have
&optional or &rest specifications? It seems like
(FTYPE (FUNCTION (INTEGER &OPTIONAL INTEGER) FLOAT))
would have been reasonable, but I can't find anything that suggests
I can do this. &REST would be more complicated, but not prohibitively so.
Am I missing something or do we not have a way to do this at all.
Do we provide a way to declare that a function is n-ary (or not) at all? That
is, the equivalent of the *EXPR and *LEXPR declarations in Maclisp? I guess
I would be surprised if there was no CL implementation that could generate
better code in cases where I declared this kind of thing ahead of time.
And while we're on the subject, is there some reason that PROCLAIM was
not made to be n-ary? It has bothered me on numerous occassions that I
have to do:
(PROCLAIM '(SPECIAL X))
(PROCLAIM '(FIXNUM X))
when we could just as well have allowed:
(PROCLAIM '(SPECIAL X) '(FIXNUM X))
Allowing multiple arguments would be more consistent with DECLARE.