[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Question about declaration
Date: Fri, 11 Dec 87 05:27:16 -0500
From: quiroz
...
I suspect I would write something as uninformative as
(proclaim '(function foo (list) (values &rest list)))
which is marginally better than no declaration at all.
While at this, how do you use the &-markers in a `values' specifier?
For instance, the only things I believe make sense after &rest in a
`values' specifier should be `null' (utterly useless) or `list'
(quite uninformative). Anything more general than `list' would
admit of impossible trash, anything disjoint with list is
unspeakable. Yet, KCL just let me try `...&rest float'. Better not
think what a compiler could do with such.
=Cesar
I think the type specifier for the function FOO is supposed to be
(PROCLAIM '(FUNCTION FOO (LIST) (VALUES &REST T))
This is because the type specifier following &REST is supposed to declare
the type of all the remaining arguments/values. You won't find this in CLtL,
but I have it marked in my copy as a proposed clarification in Guy Steele's
list.
If this is NOT the behavior of &REST, then all &REST could tell a
compiler/programmer is that this function can take/return any number
of arguments (depending on where &REST is used).
-- Nick