[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Issue DEFCONSTANT-VALUE (V2)
- To: email@example.com (Sandra J Loosemore)
- Subject: Re: Issue DEFCONSTANT-VALUE (V2)
- From: David N Gray <Gray@DSG.csc.ti.com>
- Date: Fri, 7 Oct 88 11:33:07 CDT
- Cc: CL-Compiler@sail.stanford.edu
- In-reply-to: Msg of Thu, 6 Oct 88 16:19:26 MDT from firstname.lastname@example.org (Sandra J Loosemore)
- Sender: GRAY@Kelvin.csc.ti.com
> I'm still not clear on whether you want the run-time evaluation of the
> value form to happen in a null lexical environment as well.
I was assuming that, but that could be awkward to implement now that I
think about it.
> If not, I
> think the proposal should include some strong warnings about it, since
> that would be a likely source of getting different values at load time
> than at compile time.
> Lucid also conforms to this proposal.
> My understanding of JonL's comments on this were that Lucid only does
> compile-time evaluation of the value form when the DEFCONSTANT appears
> at top-level.
That was my intent, even if it didn't come out that way.
> If you're going to go through the work
> of implementing a way to temporarily remember values of constants
> seen by the compiler, is one call to CONSTANTP going to make any
But to really do it well, it wouldn't be just a call to CONSTANTP, it
would be a code walk of the expression to see if all of the functions are
known to be safe and all of the terms are constants.