[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Issue DEFCONSTANT-VALUE (V2)



    Date: Thu, 6 Oct 88  16:24:53 CDT
    From: David N Gray <Gray@DSG.csc.ti.com>
    ...
    Issue:		DEFCONSTANT-VALUE
    ...
    Proposal DEFCONSTANT-VALUE:COMPILE-TIME:
    ...

I certainly favor a compile-time evaluation option.

    It is implementation dependent whether or not the symbol value is
    actually set at compile time or whether COMPILE-FILE temporarily
    remembers the value in some other way.
    ...

However, I a couple of major problems with this...

It implies that you can't use the variable FOO in either
a macro or an (EVAL-WHEN (COMPILE) ...). That seems unfortunate.

Not only is it sad, but it is sad for no apparent good reason.
There's no efficiency reason that I can think of for not pinning
this down and just saying it will be available at compile time.
Interpreted-only implementations (the usual exception case in 
compiler discussions) have no trouble treating this as an assignment.
And there's no other reason I can think of why you couldn't want
this available.

For reasons both of flexible coding style and principle of least
surprise in portability, I would prefer that we just require this
to assign the variable at compile time (for at least the duration
of the file -- if someone needs it beyond the end of the file, they
can load the file).