[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: (declare (type fixnum ---)) considered etc.
Date: 21 Jul 86 19:02 PDT
The fixnum declaration is one of the easiest things to remove.
a) Implementations that support (or need) fixnum declarations can add
them to their extension. This is clearly allowed by the spec, but it
becomes something that is an implementation's private extension rather
than part of the public, portable standard. The cost to implementors is
Why not leave it, but put it in the SYSTEM: package? That way, users
are reminded that they are doing something which is
implementation-dependent. Isn't this what that package is for? System
programmers, who need to refer to it, will probably be :USEing SYSTEM
anyway. [Systems programming in Lisp? Surely you jest! :-]
Are there any other symbols which ought to go in SYSTEM:?
b) Users who have code that has fixnum declarations could add,
(deftype fixnum () ...)
Or import the symbol.
c) The intent of fixnum declarations is reasonably supported by a much
more portable expression where the range of a variable is declared
explicitly rather than depending on implementation-dependent fixnum
I agree. If you're going to use declarations at all, they might as well
have some real semantic meaning. I understand that the major current
use is to encourage smart compilers on stupid hardware to generate
more efficient code, rather than to supply program-specific semantics.
But we should encourage users to use more meaningful declarations.
I don't know the source of the "certainly" in your message.