[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: How constant are defconstants?
- To: Meehan@YALE.ARPA
- Subject: Re: How constant are defconstants?
- From: JonL.pa@XEROX.ARPA
- Date: Thu, 04 Oct 1984 16:47:00 -0000
- Cc: Common-Lisp@SU-AI.ARPA
- In-reply-to: Jim Meehan <Meehan@YALE.ARPA>'s message of Wed, 3 Oct 84 17:57:19 EDT
I would assume that whereever one had written code like
that he would get the same operational behaviour as if he had written
(FOO '(MERCURY VENUS EARTH MARS JUPITER SATURN URANUS NEPTUNE PLUTO))
PDP10 MacLisp made it possible to convert all such constants into
read-only areas -- with the view to catching unintended updates such as
(SETF (CAR *PLANETS*) something)
but I'm sure that Common Lisp can't enforce such a protective mechanism
-- only permit it. Even MacLisp's solution is only partial, in that the
constants are writeable until the explicit call to "convert" everything
Interlisp has gone to the other extreme -- not only is there lots of
existing code with runtime updates to compile-time constants, but in
Interlisp-10 there is even the weird SETN to update "numbers". E.g.
-> (SETQ TEM (SETQ PI 3.14))
-> (SETN PI 3.14159)
Happily, Interlisp-D, didn't perpetuate the SETN lossage, but there is
still a lot of resistance in the Interlisp community to giving up
updatability of "constants".
-- JonL --