[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
(declare (type fixnum ---)) considered etc.
- To: common-lisp@su-ai.ARPA
- Subject: (declare (type fixnum ---)) considered etc.
- From: masinter.PA@Xerox.COM
- Date: Mon, 21 Jul 1986 20:46:00 -0000
I recently had the opportunity to port an application which had
(declare (type fixnum x y))
for some of the variables. Unfortunately, the variables could legally
exceed most-positive-fixnum in our implementation (where
most-positive-fixnum is 2^16).
Currently the book does nothing to discourage such unportable
declarations. What would have been more reasonable would be to
(declare (type (signed-byte 32) x y))
if that was what had been meant....
I'd like to see the book (if not the spec) revised to explicitly
discourage using "fixnum" in declarations, if it isn't eliminated. Most
of the other type specifiers--including those with
implementation-dependent ranges such as short-float or
string-char--don't have the same problem because they correspond to
something real in the language.