[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
(declare (type fixnum ---)) considered etc.
Date: Thu, 24 Jul 1986 14:28 EDT
From: Rob MacLachlan <RAM@C.CS.CMU.EDU>
I don't think we should have people who never use type declarations
telling those of us who do what kind of declarations we can and can't
use. Nor do I think a company should change Common Lisp so that
everyone has to buy their machines to run fast.
I don't think we should make language design issues on the basis of ad
hominem attacks. A point is valid no matter who makes it. Common Lisp
language design is made by virtue of reason, not attacks. Furthermore,
nobody is proposing to change Common Lisp.
I'm getting tired of this discussion. Why doesn't everyone just admit
we aren't going to get agreement on this issue. The split seems to be
drawn largely along special-hardware/standard-hardware lines, and
neither community is going to go away.
This simply isn't true. If I were only using standard-hardware
machines, I would still be quite concerned that a program that declared
something to be a "fixnum" might suddenly not port to another
standard-hardware machine if it had a different word size.
In any case, flushing the
fixnum declaration is not one of the proposals we are supposed to be
discussing. If it were, it would be unlikely to pass, since under the
criteria for changes, approval would have to be near-unanimous, which
"Flushing the fixnum declaration"? To quote the mail that you are
Date: Thu, 24 Jul 86 13:59 EDT
From: Robert A. Cassels <Cassels@STONY-BROOK.SCRC.Symbolics.COM>
Subject: (declare (type fixnum ---)) considered etc.
To: RAM@C.CS.CMU.EDU, Cassels@STONY-BROOK.SCRC.Symbolics.COM
I didn't say we shouldn't have type FIXNUM. I said we should put it
somewhere where it would be obvious that programs using it are probably
Don't you think you ought to read the message before flaming at the
sender? Let me make it clear again: Cassels is not advocating removing
the FIXNUM declaration. Nor am I. Got it?
Now, the point in Cassels's message that I don't agree with is the very
last paragraph, which might be the one that stimulated your reply:
Date: Thursday, 24 July 1986 13:59-EDT
From: Robert A. Cassels <Cassels at STONY-BROOK.SCRC.Symbolics.COM>
Re: (declare (type fixnum ---)) considered etc.
If you want the freedom to be sloppy, or you really
can't limit the range, you must either pay the price of reduced
performance or buy a machine which doesn't need declarations to get
performance. [I never use type declarations in my CL programs.]
The disagreement is with the last sentence, which, while true, is
deceptive because his CL programs are not trying to be both portable and
effective (i.e. fast on standard hardware). I think it was intended to
be a lighthearted comment, but wasn't taken that way.
(1) Omit numeric declarations altogether. Pro: It's very easy to do.
Pro: The program is portable. Con: The program could be slowed down if
not on special hardware.
(2) Use careful (INTEGER 0 X) declarations. Con: It takes work to
figure out what precision is really needed. Pro: The program is
portable. Pro: The program runs fast everywhere.
(3) Use FIXNUM declarations. Pro: It's pretty easy to do. Con: The
program is not necessarly portable. Pro: The programs runs fast
everywhere that it does run.
Common Lisp should and does allow all three. The point is to make it
clear, through proper phrasing in the specification and documentation,
that this is what is going on.