[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Issue: DECLARE-TYPE-FREE (Version 1)
- To: Kent M Pitman <KMP@STONY-BROOK.SCRC.Symbolics.COM>
- Subject: Re: Issue: DECLARE-TYPE-FREE (Version 1)
- From: David N Gray <Gray@DSG.csc.ti.com>
- Date: Wed, 21 Sep 88 11:50:27 CDT
- Cc: Moon@STONY-BROOK.SCRC.Symbolics.COM, CL-Cleanup@SAIL.STANFORD.EDU
- In-reply-to: Msg of Wed, 21 Sep 88 12:21 EDT from Kent M Pitman <KMP@STONY-BROOK.SCRC.Symbolics.COM>
- Sender: GRAY@Kelvin.csc.ti.com
> Well, it just occurred to me that there is an interpretation to even a disjoint
> type declaration. Consider that the paranoid programmer might try to help out
> the compiler's storage allocation phase by recycling a variable for a new type
> using SETQ because he knows it won't be used further in the program but doesn't
> know for sure that the compiler will realize this fact. Here's an example of
> that style:
>
> (DEFUN FOO (X Y)
> (DECLARE (FLOAT X Y))
> (LET ((SUM (+ X Y)))
> (DECLARE (FLOAT SUM))
> (COND ((> SUM 3.0)
> (LOCALLY (DECLARE (FIXNUM X))
> ; X won't be used any more, so let's recycle its home...
> (SETQ X (TRUNCATE SUM))
> (+ (* X X) (* SUM Y))))
> (T
> (* X Y SUM)))))
Gag! This is an example of what we most definitely want to prohibit.
This is a highly misguided programming style and can be made meaningful
only if the compiler is prohibited from using specialized storage for
variables.