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

I agree, but manual should tell LUSERs why



  |Date: Mon, 8 Apr 1985  22:37 EST
  |From: "Scott E. Fahlman" <Fahlman@CMU-CS-C.ARPA>
  |Subject: NIL and DEFCONSTANT [Gall: Bug Report]
  |
  |    Maybe a right attitude to take is that it is an error
  |    to execute any compiled code that refers to a DEFCONSTANT'ed
  |    name that has been re-DEFCONSTANT'ed to a different (non-EQL?)
  |    value since the code was compiled.
  |
  |Yeah, that seems reasonable.  We want to be able to change the value of
  |a constant if, for example, we notice a typo, but once something has
  |been compiled that uses that constant, it is unpredictable which value
  |you get if you then change the constant.
I agree. But more than just saying "it is an error to use code that
has been compiled with one value of a constant in an environment where
that constant now has a different value", we should explain what seems
obvious to us so LUSERs who can't see the obvious can be shown the
obvious and then see it themselves. (This is the sort of thing that
isn't machine-dependent, the same problem would happen on virtually
any system we imagine, thus we CAN say something more than the
mysterious cop-out "it is an error to ...".) We could say something
like "if code is compiled with the constant having one value, but then
the constant is redefined and the previously-compiled code is run, it
will probably use the old value instead of the new value. Accordingly,
it is an error to continue to run the previously-compiled code after
the constant has been redefined, and it is an error to redefine any
commonly-used system constant unless one plans to recompile the whole
LISP system immediately thereafter. It is an error to redefine T or
NIL in any case of course."

  |Maybe we'd just better tell them that it is erroneous, wrongheaded,
  |evil, and uncool to do this, and that if they persist in this practice
  |Father Lisp won't bring them any parentheses when they hang out their
  |bit buckets on Flag Day.
That's the right idea, but of course you are being flip here, the
manual certainly shouldn't be so cutesy as that.