[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Issue DEFCONSTANT-VALUE
- To: GRAY@Kelvin.csc.ti.com
- Subject: Re: Issue DEFCONSTANT-VALUE
- From: Jon L White <jonl@lucid.com>
- Date: Fri, 7 Oct 88 14:37:09 PDT
- Cc: CL-Compiler@SAIL.Stanford.edu
- In-reply-to: Msg of Wed, 5 Oct 88 15:58:01 CDT from David N Gray
I may still be a bit confused about the purpose of this proposal. The
version you subsequently sent out did reduce the "Pascal" requirement
that all constants be folded, and the phrase:
It is an error for the value expression to have a different value at
load time than it had at compile-time, so it is implementation-dependent
whether the expression is re-evaluated at load time or loads the
compile-time value.
makes it compatible with what Lucid does. In fact, it may even cover what
several other vendors do, even though they vary somewhat from Lucid.
However, the proposal seems far too long simply to be saying that
DEFCONSTANT is implicitly eval-when(eval compile load); and I don't
really see the need to say much more than that, as an alternative
to the peculiar semantics of the previous top-level definers proposal.
Perhaps a more agressive "campaign" would allow coalescing of constants
based on EQUAL rather than merely EQL [and even more agressive would
go for and equivalence that also descended pointer structures].
Let me mention again that I *did* like your first wording that required
the semantics of defconstant to be the same as if it were always folded.
This would make the runtime value of the symbol irrelevant, and could
open the way for file-specific constants (which of course is what you
have in some more conventional computer languages). As a user, I would
feel much more comfortable knowing that compile-time constants are
always folded, rather than having to worry about hidden heuristics that
fold some but turn others into global symbol references.
-- JonL --