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

Re: Issue: FUNCTION-TYPE-ARGUMENT-TYPE-SEMANTICS (version 2)



I think that much of the confusion about function type declarations is
because there are two aspects of the issue that have not been clearly
delimited:

  1. Declarations describing the definition of a function.

  2. Declarations about functions expected to be received by an argument
     or variable.

The proposal FUNCTION-TYPE-ARGUMENT-TYPE-SEMANTICS:RESTRICTIVE addresses
the first case, while the discussion in CLtL seems to have primarily the
second case in mind.  I think that the point of the comment on pages 47-48
is that given 

  (DEFUN FFF (F)
    (DECLARE (TYPE (FUNCTION (FLOAT STRING) LIST) F))
    ... (FUNCALL F (FOO ...) ...) ... )

then #'CONS is a valid argument to be passed to FFF because the declared
type of the argument is consistent with type (FUNCTION (T T) CONS).
Within FFF, the declaration permits us, for example, to assume that FOO
returns a FLOAT.  I don't think this contradicts anything in the proposal
FUNCTION-TYPE-ARGUMENT-TYPE-SEMANTICS:RESTRICTIVE, but the proposal needs
to be extended to address this side of the issue also.

  -- David Gray