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

Issue: FUNCTION-TYPE-ARGUMENT-TYPE-SEMANTICS



I have a minor nit to pick with the writeup for this issue. It says:

``Adoption Cost:

None, since making use of FUNCTION declarations is "optional".''

This isn't true because for us it means hooking up the RESTRICTIVE-FTYPE
mechanism to the FTYPE declaration. I object to the reasoning that
says that because making use of something (by implementations, I presume)
is optional, there is no adoption cost for any changes to it. For example,
making use of any declarations but SPECIAL is optional, so any incompatible
change to those type declarations would be a no-cost-for-adoption change.

Let's say that the cost of adoption is insignificant becaue the only two
implementations that do something with FTYPE declarations can be easily
changed to conform.

An alternative worth considering is to say that

  (proclaim '(ftype (function (type1 ... typen) val-type) f))

means:

if arg1,...,argn are of types type1,...,typen, then

(f arg1 ... argn)

is of type val-type.

This provides a means of describing polymorphic functions and
with some added verbiage to obtain even stricter interpretation.
The conditional is impossible to state in a useful way otherwise,
and the polymorphic form has some use for CLOS generic functions
and also arithmetic functions.

			-rpg-