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

Re: Issue: DECLARE-FUNCTION-AMBIGUITY (version 1)



(I thought I had sent out mail asking to please rename this issue.. from
FUNCTION-DECLARATION?)

I think the major motivation for this for me is that the FUNCTION-TYPE proposal,
adopted at the last meeting, now makes (DECLARE (TYPE FUNCTION a b c))
meaningful where it was not before (or certainly no compiler that I know of
could take advantage of a declaration that var1 was either a symbol or a
function object.)

Now that (DECLARE (TYPE FUNCTION a b c)) is meaningful, the use of (DECLARE
(FUNCTION a b c))  now might seem ambiguous, since it could mean

(DECLARE (FTYPE (FUNCTION b c) a))

or

(DECLARE (TYPE FUNCTION a b c ))

The only simple way of disambiguating between these is that in the first
interpretation, b must be a list, while in the second, b must be a symbol.
(Declaring NIL to be a function is an error, so it should be treated as a list.)

I'm having trouble coming up with an example that is a real ambiguity. We still
may not like the appearance of ambiguity, even though there is none, but it
weakens the argument.