[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Is CONSTANTP ever required to return true?
- To: email@example.com
- Subject: Is CONSTANTP ever required to return true?
- From: firstname.lastname@example.org (Bob Hall)
- Date: Wed, 28 Oct 92 16:58:17 EST
This is not strictly an MCL question, but I thought I'd try it here anyway.
Looking at the wording on page 494 (top) of CLtL2 that is supposed
to define what constantp does, I am confused. It says
"If the predicate constantp is true of an object, then that object, when
considered as a form to be evaluated, always evaluates to the same thing...
[goes on to give examples of things that could be constants]
If...constantp is false of an object, then that object...might or might
not always evaluate to the same thing."
Reading this strictly, it seems to allow implementations of constantp always to
return NIL, even on 4, :foo, '4, and t, because it expresses
things in terms of subjunctive sentences.
Is this just poor wording, or is the implementation really allowed to
return NIL always? More realistically, does an implementation have the
latitude to decide for itself whether, for example, constantp is true of
a symbol defined with defconstant? It doesn't seem very healthy
(for portability) to "define" a function so loosely.
Anyone know if ANSI has clarified this?