[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[no subject]
- To: NIL at MIT-MC, GLS at MIT-MC
- From: KMP at MIT-MC (Kent M. Pitman)
- Date: Sun, 12 Nov 78 07:28:00 GMT
- Cc: (BUG LISP) at MIT-MC
- Original-date: 12 NOV 1978 0228-EST
As I understood it, the purpose of having a constant was not just
initialization, but almost macrofication. Thus
(DECLARE (CONSTANT (A 5)))
would meant that 5's got inserted in the code every time an A was seen,
and that the compiler would output no code involving A's. Thus,
(DECLARE (CONSTANT (A 5)))
(DEFUN F (X) (+ X A))
would expand into (DEFUN F (X) (+ X 5)) is not a runtime controllable
entity in theory. One can't setq A and expect it to run differently, whereas
if it expanded to
(DECLARE (SPECIAL A))
(SETQ A 5)
...
(DEFUN F (X) (+ X A))
then this wouldn't be the same.
By the way, is it possible to make constants live in a different space
than ordinary variables so that SETQ's to them even during interpreted
run of the code could be trapped easily as an error?