[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Destructive operations
In my view, when a constant appears in code, the compiler is free to
store this in read-only space or do other strange things that depend on
the constantness of the constant. Many useful optimizaitons depend on
this. I thought that I could find something in the manual that implied
this clearly, but a cursory search failed. The description of
DEFCONSTANT says that the compiler assume that such constants will stay
put, but I found nothing about other constants, such as '(a b c), that
might appear in the body of the code. Still, I think that we must allow
the compiler to assume that these things will not be altered
destructively. You can always store the list in a variable if you want
it to be malleable.
CLtL doesn't say much about what the compiler is required to do or not
do. A subcommittee of X3J13 has been set up to formulate
recommendations on how to fix this. This is one of the issues that they
should address.
-- Scott