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

Re: Issue CONSTANT-MODIFICATION, version 2



Re why constants in compiled code can't be modified:

Since "collapsing" of equivalent constants is allowed, destructively
modifying compiled constants can cause unintended side-effects to
other constants which just happen to look the same.

Many implementations already put constants in read-only storage.  This 
is actually write-protected in some implementations, and in others
it is simply not scanned by the garbage collector.  Sometimes this is
done by the loader, and sometimes it's done during an image save or
other explicit compaction.

-Sandra
-------