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

Is CONSTANTP ever required to return true?

> From info-mcl-request@cambridge.apple.com Wed Oct 28 17:16:41 1992
> Date: Wed, 28 Oct 92 16:58:17 EST
> From: hall@allegra.att.com (Bob Hall)
> To: info-mcl@cambridge.apple.com
> Subject: Is CONSTANTP ever required to return true?
> Content-Length: 1101
> 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?
> -- Bob
The best way to get this answered is to forward it to the X3J13 Committee.
Currently ANSI Common Lisp is out for public review and comment, so I would
guess they would be happy to consider you concern. As an aside, you will have
to reference where in the "Standard" this wording is, not where in CLtL2. Since
CLtL2 in *not* the definitive word on the ANSI Common Lisp.