[comp.ai.digest] AIList V5 #281 - Common Lisp Portability, Chess

MAEDA@AI.AI.MIT.EDU ("Christopher M. Maeda") (12/11/87)

Reply to Ritchey Ruff on type declarations:

I don't see why you are mad at Steele for saying that compilers and
interpreters can ignore declarations.  For example, if you type the
following definition,

	(defun foo (x)
	  (declare (type x integer))
	  ...)

and you always pass integers as arguments to foo, what difference does
it make (aside from performance) if the lisp system does full type
checking or just assumes it's an integer?

	From reading your message, I think it is the buggy SLOOP macro
that you should be flaming at.  You said you typed the folowing
definition:

	(defun tst (m n)
	  (sloop for i from m to n
	         collecting i))

Why in the world would sloop declare m and n to be of type integer
when there is no such information from the programmer?  That, and the
fact that you gave tst floating point arguments when you knew they
were declared as fixnums, is what is causing your problems.

Chris Maeda