[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
NIL and DEFCONSTANT [Gall: Bug Report]
Response to Steele:
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.
That would say that it is okay to (DEFCONSTANT T 43), but then
you had better not execute any system code that refers to T.
But the evaluator probably refers to T, so in practice you had
simply better not do it.
This looks like trouble to me. I don't think we'd better tell the users
that this is legal but that they'd probably better not do it in
practice. Unlike us high-powered language designers, mere users are
likely to be confused by this. 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.